aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/args_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/args_test.go')
-rw-r--r--rpc/args_test.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/rpc/args_test.go b/rpc/args_test.go
index f00899b79..8c1e8c478 100644
--- a/rpc/args_test.go
+++ b/rpc/args_test.go
@@ -500,12 +500,18 @@ func TestNewTxArgsValueMissing(t *testing.T) {
"gasPrice": "0x9184e72a000",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
}]`
+ expected := new(NewTxArgs)
+ expected.Value = big.NewInt(0)
args := new(NewTxArgs)
- str := ExpectValidationError(json.Unmarshal([]byte(input), &args))
- if len(str) > 0 {
- t.Error(str)
+ if err := json.Unmarshal([]byte(input), &args); err != nil {
+ t.Error(err)
}
+
+ if bytes.Compare(expected.Value.Bytes(), args.Value.Bytes()) != 0 {
+ t.Errorf("Value shoud be %v but is %v", expected.Value, args.Value)
+ }
+
}
func TestNewTxArgsEmpty(t *testing.T) {