summaryrefslogtreecommitdiff
path: root/internal/api/client/account
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/client/account')
-rw-r--r--internal/api/client/account/account_test.go2
-rw-r--r--internal/api/client/account/block_test.go3
-rw-r--r--internal/api/client/account/follow_test.go3
3 files changed, 5 insertions, 3 deletions
diff --git a/internal/api/client/account/account_test.go b/internal/api/client/account/account_test.go
index 39d942ee3..ceb15c7a2 100644
--- a/internal/api/client/account/account_test.go
+++ b/internal/api/client/account/account_test.go
@@ -82,7 +82,7 @@ func (suite *AccountStandardTestSuite) TearDownTest() {
}
func (suite *AccountStandardTestSuite) newContext(recorder *httptest.ResponseRecorder, requestMethod string, requestBody []byte, requestPath string, bodyContentType string) *gin.Context {
- ctx, _ := gin.CreateTestContext(recorder)
+ ctx, _ := testrig.CreateGinTestContext(recorder, nil)
ctx.Set(oauth.SessionAuthorizedAccount, suite.testAccounts["local_account_1"])
ctx.Set(oauth.SessionAuthorizedToken, oauth.DBTokenToToken(suite.testTokens["local_account_1"]))
diff --git a/internal/api/client/account/block_test.go b/internal/api/client/account/block_test.go
index fcbe1ec39..9c75330aa 100644
--- a/internal/api/client/account/block_test.go
+++ b/internal/api/client/account/block_test.go
@@ -31,6 +31,7 @@ import (
"github.com/stretchr/testify/suite"
"github.com/superseriousbusiness/gotosocial/internal/api/client/account"
"github.com/superseriousbusiness/gotosocial/internal/oauth"
+ "github.com/superseriousbusiness/gotosocial/testrig"
)
type BlockTestSuite struct {
@@ -40,7 +41,7 @@ type BlockTestSuite struct {
func (suite *BlockTestSuite) TestBlockSelf() {
testAcct := suite.testAccounts["local_account_1"]
recorder := httptest.NewRecorder()
- ctx, _ := gin.CreateTestContext(recorder)
+ ctx, _ := testrig.CreateGinTestContext(recorder, nil)
ctx.Set(oauth.SessionAuthorizedAccount, testAcct)
ctx.Set(oauth.SessionAuthorizedToken, oauth.DBTokenToToken(suite.testTokens["local_account_1"]))
ctx.Set(oauth.SessionAuthorizedApplication, suite.testApplications["application_1"])
diff --git a/internal/api/client/account/follow_test.go b/internal/api/client/account/follow_test.go
index 478330c83..fad67b185 100644
--- a/internal/api/client/account/follow_test.go
+++ b/internal/api/client/account/follow_test.go
@@ -31,6 +31,7 @@ import (
"github.com/stretchr/testify/suite"
"github.com/superseriousbusiness/gotosocial/internal/api/client/account"
"github.com/superseriousbusiness/gotosocial/internal/oauth"
+ "github.com/superseriousbusiness/gotosocial/testrig"
)
type FollowTestSuite struct {
@@ -40,7 +41,7 @@ type FollowTestSuite struct {
func (suite *FollowTestSuite) TestFollowSelf() {
testAcct := suite.testAccounts["local_account_1"]
recorder := httptest.NewRecorder()
- ctx, _ := gin.CreateTestContext(recorder)
+ ctx, _ := testrig.CreateGinTestContext(recorder, nil)
ctx.Set(oauth.SessionAuthorizedAccount, testAcct)
ctx.Set(oauth.SessionAuthorizedToken, oauth.DBTokenToToken(suite.testTokens["local_account_1"]))
ctx.Set(oauth.SessionAuthorizedApplication, suite.testApplications["application_1"])