summaryrefslogtreecommitdiff
path: root/internal/processing/user/user_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-02-09 13:52:52 +0100
committerLibravatar GitHub <noreply@github.com>2025-02-09 13:52:52 +0100
commitce7ba8f4986845d39dfae284f156f14af677a7b4 (patch)
tree33fba82764b18a93c6a8f870316fe1cea77ec947 /internal/processing/user/user_test.go
parent[bugfix] Fix missing `hasChanged` func (#3764) (diff)
downloadgotosocial-ce7ba8f4986845d39dfae284f156f14af677a7b4.tar.xz
[bugfix] Fix POST to create account endpoint (#3767)
Diffstat (limited to 'internal/processing/user/user_test.go')
-rw-r--r--internal/processing/user/user_test.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/internal/processing/user/user_test.go b/internal/processing/user/user_test.go
index 2a9e0a89f..72fd22117 100644
--- a/internal/processing/user/user_test.go
+++ b/internal/processing/user/user_test.go
@@ -23,6 +23,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
+ "github.com/superseriousbusiness/gotosocial/internal/oauth"
"github.com/superseriousbusiness/gotosocial/internal/processing/user"
"github.com/superseriousbusiness/gotosocial/internal/state"
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
@@ -34,9 +35,11 @@ type UserStandardTestSuite struct {
emailSender email.Sender
db db.DB
state state.State
+ oauthServer oauth.Server
- testUsers map[string]*gtsmodel.User
-
+ testApps map[string]*gtsmodel.Application
+ testTokens map[string]*gtsmodel.Token
+ testUsers map[string]*gtsmodel.User
sentEmails map[string]string
user user.Processor
@@ -51,9 +54,12 @@ func (suite *UserStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
+ suite.oauthServer = testrig.NewTestOauthServer(suite.state.DB)
suite.sentEmails = make(map[string]string)
suite.emailSender = testrig.NewEmailSender("../../../web/template/", suite.sentEmails)
+ suite.testApps = testrig.NewTestApplications()
+ suite.testTokens = testrig.NewTestTokens()
suite.testUsers = testrig.NewTestUsers()
suite.user = user.New(&suite.state, typeutils.NewConverter(&suite.state), testrig.NewTestOauthServer(suite.db), suite.emailSender)