Change tests to use IsValid method
This commit is contained in:
parent
fccf5c37ca
commit
9566e9bc5d
1 changed files with 4 additions and 4 deletions
|
@ -44,8 +44,8 @@ func TestValidateValid(t *testing.T) {
|
|||
port: "",
|
||||
}
|
||||
|
||||
if err := item.Validate(); err != nil {
|
||||
t.Errorf("Validating actor returned non nil with valid input.")
|
||||
if valid, _ := item.IsValid(); !valid {
|
||||
t.Errorf("Actor was invalid with valid input.")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,8 +54,8 @@ func TestValidateInvalid(t *testing.T) {
|
|||
|
||||
actor, _ := ParseActorID(item)
|
||||
|
||||
if err := actor.Validate(); err == nil {
|
||||
t.Errorf("Validating actor returned nil with false input.")
|
||||
if valid, _ := actor.IsValid(); valid {
|
||||
t.Errorf("Actor was valid with invalid input.")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue