mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-23 15:06:15 -06:00
repurpose an existing test status instead of adding a new one to avoid breaking other tests
This commit is contained in:
parent
e02eb78cec
commit
8ef301c920
2 changed files with 3 additions and 30 deletions
|
|
@ -172,7 +172,7 @@ func (suite *StatusEditTestSuite) TestEditOnStatusWithNoContentType() {
|
||||||
|
|
||||||
// Get requester's existing status, which has no
|
// Get requester's existing status, which has no
|
||||||
// stored content type, to perform an edit on.
|
// stored content type, to perform an edit on.
|
||||||
status := suite.testStatuses["local_account_1_status_10"]
|
status := suite.testStatuses["local_account_1_status_2"]
|
||||||
status, _ = suite.state.DB.GetStatusByID(ctx, status.ID)
|
status, _ = suite.state.DB.GetStatusByID(ctx, status.ID)
|
||||||
|
|
||||||
// Prepare edit without setting a new content type.
|
// Prepare edit without setting a new content type.
|
||||||
|
|
|
||||||
|
|
@ -1557,9 +1557,8 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||||
ID: "01F8MHAYFKS4KMXF8K5Y1C0KRN",
|
ID: "01F8MHAYFKS4KMXF8K5Y1C0KRN",
|
||||||
URI: "http://localhost:8080/users/the_mighty_zork/statuses/01F8MHAYFKS4KMXF8K5Y1C0KRN",
|
URI: "http://localhost:8080/users/the_mighty_zork/statuses/01F8MHAYFKS4KMXF8K5Y1C0KRN",
|
||||||
URL: "http://localhost:8080/@the_mighty_zork/statuses/01F8MHAYFKS4KMXF8K5Y1C0KRN",
|
URL: "http://localhost:8080/@the_mighty_zork/statuses/01F8MHAYFKS4KMXF8K5Y1C0KRN",
|
||||||
Content: "this is a Public local-only post that shouldn't federate, but it's still boostable, replyable, and likeable",
|
Content: "this is a Public local-only post that shouldn't federate, but it's still boostable, replyable, and likeable. also it has no stored content type",
|
||||||
Text: "this is a Public local-only post that shouldn't federate, but it's still boostable, replyable, and likeable",
|
Text: "this is a Public local-only post that shouldn't federate, but it's still boostable, replyable, and likeable. also it has no stored content type",
|
||||||
ContentType: gtsmodel.StatusContentTypePlain,
|
|
||||||
CreatedAt: TimeMustParse("2021-10-20T12:40:37+02:00"),
|
CreatedAt: TimeMustParse("2021-10-20T12:40:37+02:00"),
|
||||||
EditedAt: time.Time{},
|
EditedAt: time.Time{},
|
||||||
Local: util.Ptr(true),
|
Local: util.Ptr(true),
|
||||||
|
|
@ -1765,32 +1764,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
|
||||||
Federated: util.Ptr(true),
|
Federated: util.Ptr(true),
|
||||||
ActivityStreamsType: ap.ObjectNote,
|
ActivityStreamsType: ap.ObjectNote,
|
||||||
},
|
},
|
||||||
"local_account_1_status_10": {
|
|
||||||
ID: "01JNKTFJCF6494E5MRR8GN47NA",
|
|
||||||
URI: "http://localhost:8080/users/the_mighty_zork/statuses/01JNKTFJCF6494E5MRR8GN47NA",
|
|
||||||
URL: "http://localhost:8080/@the_mighty_zork/statuses/01JNKTFJCF6494E5MRR8GN47NA",
|
|
||||||
Content: "<p>I am an old post with no content type stored</p>",
|
|
||||||
Text: "I am an old post with no content type stored",
|
|
||||||
ContentType: 0,
|
|
||||||
ContentWarning: "edited status",
|
|
||||||
AttachmentIDs: nil,
|
|
||||||
CreatedAt: TimeMustParse("2025-03-05T13:53:24.239-05:00"),
|
|
||||||
EditedAt: TimeMustParse("2025-03-05T13:53:24.239-05:00"),
|
|
||||||
Local: util.Ptr(true),
|
|
||||||
AccountURI: "http://localhost:8080/users/the_mighty_zork",
|
|
||||||
AccountID: "01F8MH1H7YV1Z7D2C8K2730QBF",
|
|
||||||
InReplyToID: "",
|
|
||||||
InReplyToAccountID: "",
|
|
||||||
InReplyToURI: "",
|
|
||||||
BoostOfID: "",
|
|
||||||
ThreadID: "",
|
|
||||||
Visibility: gtsmodel.VisibilityPublic,
|
|
||||||
Sensitive: util.Ptr(false),
|
|
||||||
Language: "en",
|
|
||||||
CreatedWithApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
|
|
||||||
Federated: util.Ptr(true),
|
|
||||||
ActivityStreamsType: ap.ObjectNote,
|
|
||||||
},
|
|
||||||
"local_account_2_status_1": {
|
"local_account_2_status_1": {
|
||||||
ID: "01F8MHBQCBTDKN6X5VHGMMN4MA",
|
ID: "01F8MHBQCBTDKN6X5VHGMMN4MA",
|
||||||
URI: "http://localhost:8080/users/1happyturtle/statuses/01F8MHBQCBTDKN6X5VHGMMN4MA",
|
URI: "http://localhost:8080/users/1happyturtle/statuses/01F8MHBQCBTDKN6X5VHGMMN4MA",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue