summaryrefslogtreecommitdiff
path: root/internal/api/wellknown/webfinger/webfinger_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-05-04 12:28:50 +0200
committerLibravatar GitHub <noreply@github.com>2023-05-04 12:28:50 +0200
commit5027d0ced25f06c12208cd618cfbb83518610d79 (patch)
tree5e215da7d4e6eaa5f8be7e1eead39b63b3037847 /internal/api/wellknown/webfinger/webfinger_test.go
parent[bugfix] Rework notifs to use min_id for paging up (#1734) (diff)
downloadgotosocial-5027d0ced25f06c12208cd618cfbb83518610d79.tar.xz
[bugfix] Serve correct 'application/jrd+json' content type for webfinger requests (#1738)
* [bugfix] Return `application/jrd+json` from webfinger queries * update finger req content-type
Diffstat (limited to 'internal/api/wellknown/webfinger/webfinger_test.go')
-rw-r--r--internal/api/wellknown/webfinger/webfinger_test.go36
1 files changed, 0 insertions, 36 deletions
diff --git a/internal/api/wellknown/webfinger/webfinger_test.go b/internal/api/wellknown/webfinger/webfinger_test.go
index 1d7902708..26143942c 100644
--- a/internal/api/wellknown/webfinger/webfinger_test.go
+++ b/internal/api/wellknown/webfinger/webfinger_test.go
@@ -18,12 +18,7 @@
package webfinger_test
import (
- "crypto/rand"
- "crypto/rsa"
- "time"
-
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/ap"
"github.com/superseriousbusiness/gotosocial/internal/api/wellknown/webfinger"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
@@ -103,34 +98,3 @@ func (suite *WebfingerStandardTestSuite) TearDownTest() {
testrig.StandardStorageTeardown(suite.storage)
testrig.StopWorkers(&suite.state)
}
-
-func accountDomainAccount() *gtsmodel.Account {
- privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
- if err != nil {
- panic(err)
- }
- publicKey := &privateKey.PublicKey
-
- acct := &gtsmodel.Account{
- ID: "01FG1K8EA7SYHEC7V6XKVNC4ZA",
- CreatedAt: time.Now(),
- UpdatedAt: time.Now(),
- Username: "aaaaa",
- Domain: "",
- Privacy: gtsmodel.VisibilityDefault,
- Language: "en",
- URI: "http://gts.example.org/users/aaaaa",
- URL: "http://gts.example.org/@aaaaa",
- InboxURI: "http://gts.example.org/users/aaaaa/inbox",
- OutboxURI: "http://gts.example.org/users/aaaaa/outbox",
- FollowingURI: "http://gts.example.org/users/aaaaa/following",
- FollowersURI: "http://gts.example.org/users/aaaaa/followers",
- FeaturedCollectionURI: "http://gts.example.org/users/aaaaa/collections/featured",
- ActorType: ap.ActorPerson,
- PrivateKey: privateKey,
- PublicKey: publicKey,
- PublicKeyURI: "http://gts.example.org/users/aaaaa/main-key",
- }
-
- return acct
-}