DbHexArgs tests

This commit is contained in:
Taylor Gerring
2015-03-26 19:39:40 +01:00
parent f68ca2b6e6
commit e21ce9a9b4
2 changed files with 80 additions and 2 deletions

View File

@ -567,10 +567,10 @@ func (args *DbHexArgs) UnmarshalJSON(b []byte) (err error) {
func (a *DbHexArgs) requirements() error {
if len(a.Database) == 0 {
return NewInvalidTypeError("Database", "cannot be blank")
return NewValidationError("Database", "cannot be blank")
}
if len(a.Key) == 0 {
return NewInvalidTypeError("Key", "cannot be blank")
return NewValidationError("Key", "cannot be blank")
}
return nil
}