mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-21 08:31:27 -05:00
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: "",
|
port: "",
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := item.Validate(); err != nil {
|
if valid, _ := item.IsValid(); !valid {
|
||||||
t.Errorf("Validating actor returned non nil with valid input.")
|
t.Errorf("Actor was invalid with valid input.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,8 +54,8 @@ func TestValidateInvalid(t *testing.T) {
|
||||||
|
|
||||||
actor, _ := ParseActorID(item)
|
actor, _ := ParseActorID(item)
|
||||||
|
|
||||||
if err := actor.Validate(); err == nil {
|
if valid, _ := actor.IsValid(); valid {
|
||||||
t.Errorf("Validating actor returned nil with false input.")
|
t.Errorf("Actor was valid with invalid input.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue