mirror of
1
Fork 0

repurpose an existing test status instead of adding a new one to avoid breaking other tests

This commit is contained in:
ewin 2025-03-05 14:59:14 -05:00
parent e02eb78cec
commit 8ef301c920
No known key found for this signature in database
2 changed files with 3 additions and 30 deletions

View File

@ -172,7 +172,7 @@ func (suite *StatusEditTestSuite) TestEditOnStatusWithNoContentType() {
// Get requester's existing status, which has no
// 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)
// Prepare edit without setting a new content type.

View File

@ -1557,9 +1557,8 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
ID: "01F8MHAYFKS4KMXF8K5Y1C0KRN",
URI: "http://localhost:8080/users/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",
Text: "this is a Public local-only post that shouldn't federate, but it's still boostable, replyable, and likeable",
ContentType: gtsmodel.StatusContentTypePlain,
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. also it has no stored content type",
CreatedAt: TimeMustParse("2021-10-20T12:40:37+02:00"),
EditedAt: time.Time{},
Local: util.Ptr(true),
@ -1765,32 +1764,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Federated: util.Ptr(true),
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": {
ID: "01F8MHBQCBTDKN6X5VHGMMN4MA",
URI: "http://localhost:8080/users/1happyturtle/statuses/01F8MHBQCBTDKN6X5VHGMMN4MA",