add test on validate amount
This commit is contained in:
parent
4889e6d18b
commit
1d27a88908
@ -1468,6 +1468,7 @@ func TestValidateAmount(t *testing.T) {
|
|||||||
t.Logf(err.Error())
|
t.Logf(err.Error())
|
||||||
}
|
}
|
||||||
flag_invalid_amount, _ := fm.parser.GetFlag("flag_invalid_amount")
|
flag_invalid_amount, _ := fm.parser.GetFlag("flag_invalid_amount")
|
||||||
|
flag_api_error, _ := fm.GetFlag("flag_api_call_error")
|
||||||
mockDataStore := new(mocks.MockUserDataStore)
|
mockDataStore := new(mocks.MockUserDataStore)
|
||||||
mockCreateAccountService := new(mocks.MockAccountService)
|
mockCreateAccountService := new(mocks.MockAccountService)
|
||||||
|
|
||||||
@ -1503,6 +1504,7 @@ func TestValidateAmount(t *testing.T) {
|
|||||||
publicKey: []byte("0xrqeqrequuq"),
|
publicKey: []byte("0xrqeqrequuq"),
|
||||||
expectedResult: resource.Result{
|
expectedResult: resource.Result{
|
||||||
Content: "0.001",
|
Content: "0.001",
|
||||||
|
FlagReset: []uint32{flag_api_error},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1521,6 +1523,7 @@ func TestValidateAmount(t *testing.T) {
|
|||||||
publicKey: []byte("0xrqeqrequuq"),
|
publicKey: []byte("0xrqeqrequuq"),
|
||||||
expectedResult: resource.Result{
|
expectedResult: resource.Result{
|
||||||
FlagSet: []uint32{flag_invalid_amount},
|
FlagSet: []uint32{flag_invalid_amount},
|
||||||
|
FlagReset: []uint32{flag_api_error},
|
||||||
Content: "0.02",
|
Content: "0.02",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -1540,6 +1543,7 @@ func TestValidateAmount(t *testing.T) {
|
|||||||
publicKey: []byte("0xrqeqrequuq"),
|
publicKey: []byte("0xrqeqrequuq"),
|
||||||
expectedResult: resource.Result{
|
expectedResult: resource.Result{
|
||||||
FlagSet: []uint32{flag_invalid_amount},
|
FlagSet: []uint32{flag_invalid_amount},
|
||||||
|
FlagReset: []uint32{flag_api_error},
|
||||||
Content: "0.02ms",
|
Content: "0.02ms",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user