Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-25 11:16:11 +01: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: "",
}
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.")
}
}