summaryrefslogtreecommitdiff
path: root/internal/federation/federatingactor_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/federation/federatingactor_test.go')
-rw-r--r--internal/federation/federatingactor_test.go68
1 files changed, 0 insertions, 68 deletions
diff --git a/internal/federation/federatingactor_test.go b/internal/federation/federatingactor_test.go
index d07b56537..b6814862f 100644
--- a/internal/federation/federatingactor_test.go
+++ b/internal/federation/federatingactor_test.go
@@ -154,71 +154,3 @@ func (suite *FederatingActorTestSuite) TestSendRemoteFollower() {
func TestFederatingActorTestSuite(t *testing.T) {
suite.Run(t, new(FederatingActorTestSuite))
}
-
-func TestIsASMediaType(t *testing.T) {
- for _, test := range []struct {
- Input string
- Expect bool
- }{
- {
- Input: "application/activity+json",
- Expect: true,
- },
- {
- Input: "application/activity+json; charset=utf-8",
- Expect: true,
- },
- {
- Input: "application/activity+json;charset=utf-8",
- Expect: true,
- },
- {
- Input: "application/activity+json ;charset=utf-8",
- Expect: true,
- },
- {
- Input: "application/activity+json ; charset=utf-8",
- Expect: true,
- },
- {
- Input: "application/ld+json;profile=https://www.w3.org/ns/activitystreams",
- Expect: true,
- },
- {
- Input: "application/ld+json;profile=\"https://www.w3.org/ns/activitystreams\"",
- Expect: true,
- },
- {
- Input: "application/ld+json ;profile=https://www.w3.org/ns/activitystreams",
- Expect: true,
- },
- {
- Input: "application/ld+json ;profile=\"https://www.w3.org/ns/activitystreams\"",
- Expect: true,
- },
- {
- Input: "application/ld+json ; profile=https://www.w3.org/ns/activitystreams",
- Expect: true,
- },
- {
- Input: "application/ld+json ; profile=\"https://www.w3.org/ns/activitystreams\"",
- Expect: true,
- },
- {
- Input: "application/ld+json; profile=https://www.w3.org/ns/activitystreams",
- Expect: true,
- },
- {
- Input: "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"",
- Expect: true,
- },
- {
- Input: "application/ld+json",
- Expect: false,
- },
- } {
- if federation.IsASMediaType(test.Input) != test.Expect {
- t.Errorf("did not get expected result %v for input: %s", test.Expect, test.Input)
- }
- }
-}