mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-23 11:01:49 +01: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: "",
|
||||
}
|
||||
|
||||
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…
Reference in a new issue