Add InvalidTypeError

This commit is contained in:
Taylor Gerring
2015-03-26 13:33:44 +01:00
parent c139af5826
commit ca03e97697
2 changed files with 25 additions and 0 deletions

View File

@ -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"