From 9566e9bc5d3b518d5a02a2b74639d5cec4beb568 Mon Sep 17 00:00:00 2001 From: erik Date: Fri, 24 Nov 2023 11:38:01 +0100 Subject: [PATCH] Change tests to use IsValid method --- models/activitypub/actor_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/models/activitypub/actor_test.go b/models/activitypub/actor_test.go index a7e127d9e0..c27e6b0047 100644 --- a/models/activitypub/actor_test.go +++ b/models/activitypub/actor_test.go @@ -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.") } }