aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/args_test.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-27 03:10:31 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-27 03:10:31 +0800
commit1f1e98f96b57c0c5c7a9350129f67d425a4c6af4 (patch)
treee2a6a9e8e273fe7240cec9d7c73aa9113a165fa9 /rpc/args_test.go
parent62ebf999bf71ef05e34e234b6e07cc31188970b7 (diff)
downloaddexon-1f1e98f96b57c0c5c7a9350129f67d425a4c6af4.tar.gz
dexon-1f1e98f96b57c0c5c7a9350129f67d425a4c6af4.tar.zst
dexon-1f1e98f96b57c0c5c7a9350129f67d425a4c6af4.zip
FilterIdArgs
Diffstat (limited to 'rpc/args_test.go')
-rw-r--r--rpc/args_test.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/rpc/args_test.go b/rpc/args_test.go
index 9325b1c9b..7bbf729f2 100644
--- a/rpc/args_test.go
+++ b/rpc/args_test.go
@@ -1056,6 +1056,36 @@ func TestFilterIdArgs(t *testing.T) {
}
}
+func TestFilterIdArgsInvalid(t *testing.T) {
+ input := `{}`
+
+ args := new(FilterIdArgs)
+ str := ExpectDecodeParamError(json.Unmarshal([]byte(input), &args))
+ if len(str) > 0 {
+ t.Errorf(str)
+ }
+}
+
+func TestFilterIdArgsEmpty(t *testing.T) {
+ input := `[]`
+
+ args := new(FilterIdArgs)
+ str := ExpectInsufficientParamsError(json.Unmarshal([]byte(input), &args))
+ if len(str) > 0 {
+ t.Errorf(str)
+ }
+}
+
+func TestFilterIdArgsBool(t *testing.T) {
+ input := `[true]`
+
+ args := new(FilterIdArgs)
+ str := ExpectInvalidTypeError(json.Unmarshal([]byte(input), &args))
+ if len(str) > 0 {
+ t.Errorf(str)
+ }
+}
+
func TestWhsiperFilterArgs(t *testing.T) {
input := `[{"topics": ["0x68656c6c6f20776f726c64"], "to": "0x34ag445g3455b34"}]`
expected := new(WhisperFilterArgs)