summaryrefslogtreecommitdiff
path: root/internal/api/client/auth/authorize_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/client/auth/authorize_test.go')
-rw-r--r--internal/api/client/auth/authorize_test.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/internal/api/client/auth/authorize_test.go b/internal/api/client/auth/authorize_test.go
index eab893416..fcc4b8caa 100644
--- a/internal/api/client/auth/authorize_test.go
+++ b/internal/api/client/auth/authorize_test.go
@@ -76,8 +76,11 @@ func (suite *AuthAuthorizeTestSuite) TestAccountAuthorizeHandler() {
doTest := func(testCase authorizeHandlerTestCase) {
ctx, recorder := suite.newContext(http.MethodGet, auth.OauthAuthorizePath, nil, "")
- user := suite.testUsers["unconfirmed_account"]
- account := suite.testAccounts["unconfirmed_account"]
+ user := &gtsmodel.User{}
+ account := &gtsmodel.Account{}
+
+ *user = *suite.testUsers["unconfirmed_account"]
+ *account = *suite.testAccounts["unconfirmed_account"]
testSession := sessions.Default(ctx)
testSession.Set(sessionUserID, user.ID)
@@ -91,8 +94,7 @@ func (suite *AuthAuthorizeTestSuite) TestAccountAuthorizeHandler() {
testCase.description = fmt.Sprintf("%s, %t, %s", user.Email, *user.Disabled, account.SuspendedAt)
updatingColumns = append(updatingColumns, "updated_at")
- user.UpdatedAt = time.Now()
- err := suite.db.UpdateByPrimaryKey(context.Background(), user, updatingColumns...)
+ _, err := suite.db.UpdateUser(context.Background(), user, updatingColumns...)
suite.NoError(err)
_, err = suite.db.UpdateAccount(context.Background(), account)
suite.NoError(err)