From 88a549f345aa9efc172895c009140bdb08361344 Mon Sep 17 00:00:00 2001 From: pnwmatt <180812017+pnwmatt@users.noreply.github.com> Date: Fri, 7 Feb 2025 11:56:17 -0800 Subject: [PATCH] Another round of `group` stubbing for tests --- internal/api/client/admin/reportsget_test.go | 39 ++++++++++----- .../api/client/statuses/statushistory_test.go | 3 +- .../api/client/statuses/statusmute_test.go | 6 ++- internal/typeutils/internaltofrontend_test.go | 48 ++++++++++++------- 4 files changed, 62 insertions(+), 34 deletions(-) diff --git a/internal/api/client/admin/reportsget_test.go b/internal/api/client/admin/reportsget_test.go index 255e32c3b..3af187ad2 100644 --- a/internal/api/client/admin/reportsget_test.go +++ b/internal/api/client/admin/reportsget_test.go @@ -189,7 +189,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "statuses_count": 4, "last_status_at": "2024-11-01", "emojis": [], - "fields": [] + "fields": [], + "group": false } }, "target_account": { @@ -247,7 +248,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "verified_at": null } ], - "hide_collections": true + "hide_collections": true, + "group": false }, "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG" }, @@ -302,7 +304,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "name": "admin", "color": "" } - ] + ], + "group": false }, "created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F" }, @@ -357,7 +360,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "name": "admin", "color": "" } - ] + ], + "group": false }, "created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F" }, @@ -429,7 +433,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "verified_at": null } ], - "hide_collections": true + "hide_collections": true, + "group": false }, "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG" }, @@ -476,7 +481,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "statuses_count": 4, "last_status_at": "2024-11-01", "emojis": [], - "fields": [] + "fields": [], + "group": false } }, "assigned_account": null, @@ -525,7 +531,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "statuses_count": 4, "last_status_at": "2024-11-01", "emojis": [], - "fields": [] + "fields": [], + "group": false }, "media_attachments": [ { @@ -683,7 +690,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetCreatedByAccount() { "verified_at": null } ], - "hide_collections": true + "hide_collections": true, + "group": false }, "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG" }, @@ -730,7 +738,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetCreatedByAccount() { "statuses_count": 4, "last_status_at": "2024-11-01", "emojis": [], - "fields": [] + "fields": [], + "group": false } }, "assigned_account": null, @@ -779,7 +788,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetCreatedByAccount() { "statuses_count": 4, "last_status_at": "2024-11-01", "emojis": [], - "fields": [] + "fields": [], + "group": false }, "media_attachments": [ { @@ -937,7 +947,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetTargetAccount() { "verified_at": null } ], - "hide_collections": true + "hide_collections": true, + "group": false }, "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG" }, @@ -984,7 +995,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetTargetAccount() { "statuses_count": 4, "last_status_at": "2024-11-01", "emojis": [], - "fields": [] + "fields": [], + "group": false } }, "assigned_account": null, @@ -1033,7 +1045,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetTargetAccount() { "statuses_count": 4, "last_status_at": "2024-11-01", "emojis": [], - "fields": [] + "fields": [], + "group": false }, "media_attachments": [ { diff --git a/internal/api/client/statuses/statushistory_test.go b/internal/api/client/statuses/statushistory_test.go index 3878f54e4..61c15b58a 100644 --- a/internal/api/client/statuses/statushistory_test.go +++ b/internal/api/client/statuses/statushistory_test.go @@ -120,7 +120,8 @@ func (suite *StatusHistoryTestSuite) TestGetHistory() { "last_status_at": "2024-11-01", "emojis": [], "fields": [], - "enable_rss": true + "enable_rss": true, + "group": false }, "poll": null, "media_attachments": [], diff --git a/internal/api/client/statuses/statusmute_test.go b/internal/api/client/statuses/statusmute_test.go index 66bd4a420..20ee590f8 100644 --- a/internal/api/client/statuses/statusmute_test.go +++ b/internal/api/client/statuses/statusmute_test.go @@ -139,7 +139,8 @@ func (suite *StatusMuteTestSuite) TestMuteUnmuteStatus() { "last_status_at": "2024-11-01", "emojis": [], "fields": [], - "enable_rss": true + "enable_rss": true, + "group": false }, "media_attachments": [], "mentions": [], @@ -227,7 +228,8 @@ func (suite *StatusMuteTestSuite) TestMuteUnmuteStatus() { "last_status_at": "2024-11-01", "emojis": [], "fields": [], - "enable_rss": true + "enable_rss": true, + "group": false }, "media_attachments": [], "mentions": [], diff --git a/internal/typeutils/internaltofrontend_test.go b/internal/typeutils/internaltofrontend_test.go index 611899ac6..e749dafe4 100644 --- a/internal/typeutils/internaltofrontend_test.go +++ b/internal/typeutils/internaltofrontend_test.go @@ -72,7 +72,8 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontend() { "last_status_at": "2024-11-01", "emojis": [], "fields": [], - "enable_rss": true + "enable_rss": true, + "group": false }`, string(b)) } @@ -178,8 +179,10 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontendAliasedAndMoved() "verified_at": null } ], - "hide_collections": true - } + "hide_collections": true, + "group": false + }, + "group": false }`, string(b)) } @@ -230,7 +233,8 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontendWithEmojiStruct() } ], "fields": [], - "enable_rss": true + "enable_rss": true, + "group": false }`, string(b)) } @@ -279,7 +283,8 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontendWithEmojiIDs() { } ], "fields": [], - "enable_rss": true + "enable_rss": true, + "group": false }`, string(b)) } @@ -333,7 +338,8 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontendSensitive() { "color": "", "permissions": "0", "highlighted": false - } + }, + "group": false }`, string(b)) } @@ -370,7 +376,8 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontendPublicPunycode() "statuses_count": 0, "last_status_at": null, "emojis": [], - "fields": [] + "fields": [], + "group": false }`, string(b)) } @@ -409,7 +416,8 @@ func (suite *InternalToFrontendTestSuite) TestLocalInstanceAccountToFrontendPubl "statuses_count": 0, "last_status_at": null, "emojis": [], - "fields": [] + "fields": [], + "group": false }`, string(b)) } @@ -448,7 +456,8 @@ func (suite *InternalToFrontendTestSuite) TestLocalInstanceAccountToFrontendBloc "statuses_count": 0, "last_status_at": null, "emojis": [], - "fields": [] + "fields": [], + "group": false }`, string(b)) } @@ -516,7 +525,8 @@ func (suite *InternalToFrontendTestSuite) TestStatusToFrontend() { "name": "admin", "color": "" } - ] + ], + "group": false }, "media_attachments": [ { @@ -2644,10 +2654,10 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend1() { "name": "admin", "color": "" } - ] + ], + "group": false }, - "created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F", - "group": false + "created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F" }, "statuses": [], "rules": [], @@ -2727,10 +2737,10 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend2() { "verified_at": null } ], - "hide_collections": true + "hide_collections": true, + "group": false }, - "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG", - "group": false + "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG" }, "target_account": { "id": "01F8MH5ZK5VRH73AKHQM6Y9VNX", @@ -3557,7 +3567,8 @@ func (suite *InternalToFrontendTestSuite) TestConversationToAPISelfConvo() { "last_status_at": "2024-11-01", "emojis": [], "fields": [], - "enable_rss": true + "enable_rss": true, + "group": false } ], "last_status": { @@ -3725,7 +3736,8 @@ func (suite *InternalToFrontendTestSuite) TestConversationToAPI() { "verified_at": null } ], - "hide_collections": true + "hide_collections": true, + "group": false } ], "last_status": {