diff options
author | 2023-11-11 10:15:04 +0000 | |
---|---|---|
committer | 2023-11-11 10:15:04 +0000 | |
commit | deaea100c37698893e97cf9cab159a3d220ac3cd (patch) | |
tree | f48abc96964652d1701d91c88a00174c8f1b0196 /testrig/testmodels.go | |
parent | [feature] Media attachment placeholders (#2331) (diff) | |
download | gotosocial-deaea100c37698893e97cf9cab159a3d220ac3cd.tar.xz |
[bugfix] support endless polls, and misskey's' method of inferring expiry in closed polls (#2349)
Diffstat (limited to 'testrig/testmodels.go')
-rw-r--r-- | testrig/testmodels.go | 45 |
1 files changed, 43 insertions, 2 deletions
diff --git a/testrig/testmodels.go b/testrig/testmodels.go index d27f91e11..248508013 100644 --- a/testrig/testmodels.go +++ b/testrig/testmodels.go @@ -1916,8 +1916,8 @@ func NewTestStatuses() map[string]*gtsmodel.Status { }, "remote_account_1_status_2": { ID: "01HEN2QRFA8H3C6QPN7RD4KSR6", - URI: "http://fossbros-anonymous.io/users/foss_satan/statuses/065TKDN4BX1PC8N19TSY9SD2N4", - URL: "http://fossbros-anonymous.io/@foss_satan/statuses/065TKDN4BX1PC8N19TSY9SD2N4", + URI: "http://fossbros-anonymous.io/users/foss_satan/statuses/01HEN2QRFA8H3C6QPN7RD4KSR6", + URL: "http://fossbros-anonymous.io/@foss_satan/statuses/01HEN2QRFA8H3C6QPN7RD4KSR6", Content: "what products should i buy at the grocery store?", AttachmentIDs: []string{"01FVW7RXPQ8YJHTEXYPE7Q8ZY0"}, CreatedAt: TimeMustParse("2021-09-11T11:40:37+02:00"), @@ -1941,6 +1941,33 @@ func NewTestStatuses() map[string]*gtsmodel.Status { ActivityStreamsType: ap.ActivityQuestion, PollID: "01HEN2R65468ZG657C4ZPHJ4EX", }, + "remote_account_1_status_3": { + ID: "01HEWV37MHV8BAC8ANFGVRRM5D", + URI: "http://fossbros-anonymous.io/users/foss_satan/statuses/01HEWV37MHV8BAC8ANFGVRRM5D", + URL: "http://fossbros-anonymous.io/@foss_satan/statuses/01HEWV37MHV8BAC8ANFGVRRM5D", + Content: "what products should i buy at the grocery store? (now an endless poll!)", + AttachmentIDs: []string{"01FVW7RXPQ8YJHTEXYPE7Q8ZY0"}, + CreatedAt: TimeMustParse("2021-09-11T11:40:37+02:00"), + UpdatedAt: TimeMustParse("2021-09-11T11:40:37+02:00"), + Local: util.Ptr(false), + AccountURI: "http://fossbros-anonymous.io/users/foss_satan", + AccountID: "01F8MH5ZK5VRH73AKHQM6Y9VNX", + InReplyToID: "", + InReplyToAccountID: "", + InReplyToURI: "", + BoostOfID: "", + ContentWarning: "", + Visibility: gtsmodel.VisibilityUnlocked, + Sensitive: util.Ptr(false), + Language: "en", + CreatedWithApplicationID: "", + Federated: util.Ptr(true), + Boostable: util.Ptr(true), + Replyable: util.Ptr(true), + Likeable: util.Ptr(true), + ActivityStreamsType: ap.ActivityQuestion, + PollID: "01HEWV1GW2D49R919NPEDXPTZ5", + }, "remote_account_2_status_1": { ID: "01HE7XJ1CG84TBKH5V9XKBVGF5", URI: "http://example.org/users/Some_User/statuses/01HE7XJ1CG84TBKH5V9XKBVGF5", @@ -2012,6 +2039,20 @@ func NewTestPolls() map[string]*gtsmodel.Poll { ClosedAt: TimeMustParse("2021-09-11T12:40:37+02:00"), Closing: false, }, + "remote_account_1_status_3_poll": { + ID: "01HEWV1GW2D49R919NPEDXPTZ5", + Multiple: util.Ptr(true), + HideCounts: util.Ptr(false), + Options: []string{"vaseline", "tissues", "financial times"}, + Votes: []int{0, 0, 0}, + Voters: util.Ptr(0), + StatusID: "01HEWV37MHV8BAC8ANFGVRRM5D", + Status: nil, + // nil expiry AND closed date, i.e. no end + ExpiresAt: time.Time{}, + ClosedAt: time.Time{}, + Closing: false, + }, } } |