mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-30 08:16:15 -06:00
more big changes
This commit is contained in:
parent
b9746a30f3
commit
4e054233da
71 changed files with 640 additions and 405 deletions
|
|
@ -83,7 +83,7 @@ https://docs.gotosocial.org/en/latest/user_guide/posts/#links
|
|||
func (suite *StatusCreateTestSuite) TestPostNewStatus() {
|
||||
|
||||
t := suite.testTokens["local_account_1"]
|
||||
oauthToken := oauth.TokenToOauthToken(t)
|
||||
oauthToken := oauth.DBTokenToToken(t)
|
||||
|
||||
// setup
|
||||
recorder := httptest.NewRecorder()
|
||||
|
|
@ -137,7 +137,7 @@ func (suite *StatusCreateTestSuite) TestPostNewStatus() {
|
|||
func (suite *StatusCreateTestSuite) TestPostAnotherNewStatus() {
|
||||
|
||||
t := suite.testTokens["local_account_1"]
|
||||
oauthToken := oauth.TokenToOauthToken(t)
|
||||
oauthToken := oauth.DBTokenToToken(t)
|
||||
|
||||
// setup
|
||||
recorder := httptest.NewRecorder()
|
||||
|
|
@ -172,7 +172,7 @@ func (suite *StatusCreateTestSuite) TestPostAnotherNewStatus() {
|
|||
func (suite *StatusCreateTestSuite) TestPostNewStatusWithEmoji() {
|
||||
|
||||
t := suite.testTokens["local_account_1"]
|
||||
oauthToken := oauth.TokenToOauthToken(t)
|
||||
oauthToken := oauth.DBTokenToToken(t)
|
||||
|
||||
// setup
|
||||
recorder := httptest.NewRecorder()
|
||||
|
|
@ -213,7 +213,7 @@ func (suite *StatusCreateTestSuite) TestPostNewStatusWithEmoji() {
|
|||
// Try to reply to a status that doesn't exist
|
||||
func (suite *StatusCreateTestSuite) TestReplyToNonexistentStatus() {
|
||||
t := suite.testTokens["local_account_1"]
|
||||
oauthToken := oauth.TokenToOauthToken(t)
|
||||
oauthToken := oauth.DBTokenToToken(t)
|
||||
|
||||
// setup
|
||||
recorder := httptest.NewRecorder()
|
||||
|
|
@ -244,7 +244,7 @@ func (suite *StatusCreateTestSuite) TestReplyToNonexistentStatus() {
|
|||
// Post a reply to the status of a local user that allows replies.
|
||||
func (suite *StatusCreateTestSuite) TestReplyToLocalStatus() {
|
||||
t := suite.testTokens["local_account_1"]
|
||||
oauthToken := oauth.TokenToOauthToken(t)
|
||||
oauthToken := oauth.DBTokenToToken(t)
|
||||
|
||||
// setup
|
||||
recorder := httptest.NewRecorder()
|
||||
|
|
@ -284,7 +284,7 @@ func (suite *StatusCreateTestSuite) TestReplyToLocalStatus() {
|
|||
// Take a media file which is currently not associated with a status, and attach it to a new status.
|
||||
func (suite *StatusCreateTestSuite) TestAttachNewMediaSuccess() {
|
||||
t := suite.testTokens["local_account_1"]
|
||||
oauthToken := oauth.TokenToOauthToken(t)
|
||||
oauthToken := oauth.DBTokenToToken(t)
|
||||
|
||||
attachment := suite.testAttachments["local_account_1_unattached_1"]
|
||||
|
||||
|
|
@ -323,8 +323,7 @@ func (suite *StatusCreateTestSuite) TestAttachNewMediaSuccess() {
|
|||
assert.Len(suite.T(), statusResponse.MediaAttachments, 1)
|
||||
|
||||
// get the updated media attachment from the database
|
||||
gtsAttachment := >smodel.MediaAttachment{}
|
||||
err = suite.db.GetByID(context.Background(), statusResponse.MediaAttachments[0].ID, gtsAttachment)
|
||||
gtsAttachment, err := suite.db.GetAttachmentByID(context.Background(), statusResponse.MediaAttachments[0].ID)
|
||||
assert.NoError(suite.T(), err)
|
||||
|
||||
// convert it to a masto attachment
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue