From 5729cee3e55f03eadbbb9d5361dacd695ec0268a Mon Sep 17 00:00:00 2001 From: erik Date: Thu, 16 Nov 2023 16:04:50 +0100 Subject: [PATCH] Move test to model/activitypub --- .../activitypub/actor_test.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) rename routers/api/v1/activitypub/repository_test.go => models/activitypub/actor_test.go (79%) diff --git a/routers/api/v1/activitypub/repository_test.go b/models/activitypub/actor_test.go similarity index 79% rename from routers/api/v1/activitypub/repository_test.go rename to models/activitypub/actor_test.go index 14cf2fa792..1188a78afd 100644 --- a/routers/api/v1/activitypub/repository_test.go +++ b/models/activitypub/actor_test.go @@ -5,18 +5,8 @@ package activitypub import ( "testing" - - "code.gitea.io/gitea/models/activitypub" ) -type ActorData struct { // ToDo: is a mock struct a good idea? - schema string - userId string - path string - host string - port string // optional -} - func Test_ActorParser(t *testing.T) { type testPair struct { item string @@ -52,7 +42,7 @@ func Test_ActorParser(t *testing.T) { for name, _ := range tests { t.Run(name, func(t *testing.T) { - _, err := activitypub.ParseActorData(tests[name].item) + _, err := ParseActorData(tests[name].item) if err != nil { t.Errorf("parseActor() error = \"%v\"", err)