1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-25 08:59:31 -05:00

Change tests to use IsValid method

This commit is contained in:
erik 2023-11-24 11:38:01 +01:00 committed by Michael Jerger
parent fccf5c37ca
commit 9566e9bc5d

View file

@ -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.")
} }
} }