summaryrefslogtreecommitdiff
path: root/internal/apimodule/media/test/mediacreate_test.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@klarrio.com>2021-04-20 18:14:23 +0200
committerLibravatar tsmethurst <tobi.smethurst@klarrio.com>2021-04-20 18:14:23 +0200
commitdafc3b5b92865b97be48456e02ad235f4c79cf4e (patch)
tree0f97edf4377f406df321054d26e731ff5dcc6667 /internal/apimodule/media/test/mediacreate_test.go
parentApi/v1/statuses (#11) (diff)
downloadgotosocial-dafc3b5b92865b97be48456e02ad235f4c79cf4e.tar.xz
linting + organizing
Diffstat (limited to 'internal/apimodule/media/test/mediacreate_test.go')
-rw-r--r--internal/apimodule/media/test/mediacreate_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/apimodule/media/test/mediacreate_test.go b/internal/apimodule/media/test/mediacreate_test.go
index 01a0a6a31..30bbb117a 100644
--- a/internal/apimodule/media/test/mediacreate_test.go
+++ b/internal/apimodule/media/test/mediacreate_test.go
@@ -52,7 +52,7 @@ type MediaCreateTestSuite struct {
log *logrus.Logger
storage storage.Storage
mastoConverter mastotypes.Converter
- mediaHandler media.MediaHandler
+ mediaHandler media.Handler
oauthServer oauth.Server
// standard suite models
@@ -64,7 +64,7 @@ type MediaCreateTestSuite struct {
testAttachments map[string]*gtsmodel.MediaAttachment
// item being tested
- mediaModule *mediamodule.MediaModule
+ mediaModule *mediamodule.Module
}
/*
@@ -82,7 +82,7 @@ func (suite *MediaCreateTestSuite) SetupSuite() {
suite.oauthServer = testrig.NewTestOauthServer(suite.db)
// setup module being tested
- suite.mediaModule = mediamodule.New(suite.db, suite.mediaHandler, suite.mastoConverter, suite.config, suite.log).(*mediamodule.MediaModule)
+ suite.mediaModule = mediamodule.New(suite.db, suite.mediaHandler, suite.mastoConverter, suite.config, suite.log).(*mediamodule.Module)
}
func (suite *MediaCreateTestSuite) TearDownSuite() {
@@ -115,7 +115,7 @@ func (suite *MediaCreateTestSuite) TestStatusCreatePOSTImageHandlerSuccessful()
// set up the context for the request
t := suite.testTokens["local_account_1"]
- oauthToken := oauth.PGTokenToOauthToken(t)
+ oauthToken := oauth.TokenToOauthToken(t)
recorder := httptest.NewRecorder()
ctx, _ := gin.CreateTestContext(recorder)
ctx.Set(oauth.SessionAuthorizedApplication, suite.testApplications["application_1"])