aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/messages_test.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-26 20:33:44 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-26 20:33:44 +0800
commitca03e976976a03d278da227fe1ec9966f23484ba (patch)
tree408eb00bb54ccc10d831523690289d85b53a1f9e /rpc/messages_test.go
parentc139af582663d760f58e7b50dcb9f355c47ef47e (diff)
downloaddexon-ca03e976976a03d278da227fe1ec9966f23484ba.tar
dexon-ca03e976976a03d278da227fe1ec9966f23484ba.tar.gz
dexon-ca03e976976a03d278da227fe1ec9966f23484ba.tar.bz2
dexon-ca03e976976a03d278da227fe1ec9966f23484ba.tar.lz
dexon-ca03e976976a03d278da227fe1ec9966f23484ba.tar.xz
dexon-ca03e976976a03d278da227fe1ec9966f23484ba.tar.zst
dexon-ca03e976976a03d278da227fe1ec9966f23484ba.zip
Add InvalidTypeError
Diffstat (limited to 'rpc/messages_test.go')
-rw-r--r--rpc/messages_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/rpc/messages_test.go b/rpc/messages_test.go
index 5274c91e4..91f0152dc 100644
--- a/rpc/messages_test.go
+++ b/rpc/messages_test.go
@@ -4,6 +4,15 @@ import (
"testing"
)
+func TestInvalidTypeError(t *testing.T) {
+ err := NewInvalidTypeError("testField", "not string")
+ expected := "invalid type on field testField: not string"
+
+ if err.Error() != expected {
+ t.Error(err.Error())
+ }
+}
+
func TestInsufficientParamsError(t *testing.T) {
err := NewInsufficientParamsError(0, 1)
expected := "insufficient params, want 1 have 0"