diff options
author | 2025-02-08 04:04:30 -0800 | |
---|---|---|
committer | 2025-02-08 13:04:30 +0100 | |
commit | e10de8464ae577d0a917482d01e7e01fbaf63460 (patch) | |
tree | 4fb48ed5fe37e5f7faa417ab79c98ff62178d48f /internal/api/client | |
parent | [chore] Update drone + goreleaser (#3742) (diff) | |
download | gotosocial-e10de8464ae577d0a917482d01e7e01fbaf63460.tar.xz |
[bug] Add missing `group` property to the Account model (#3746)
* Stub out account's Group parameter
* Fix typo in Contributing documentation
* Update swagger and match style
* Update the swagger command to mimic test/swagger.sh
* Fix tests for new `group` param in Account model
* More test changes for new `group` param in Account
* Continuing test changes for `group` param stubbing
* Another round of `group` stubbing for tests
Diffstat (limited to 'internal/api/client')
-rw-r--r-- | internal/api/client/admin/accountsgetv2_test.go | 30 | ||||
-rw-r--r-- | internal/api/client/admin/reportsget_test.go | 39 | ||||
-rw-r--r-- | internal/api/client/followrequests/get_test.go | 3 | ||||
-rw-r--r-- | internal/api/client/instance/instancepatch_test.go | 18 | ||||
-rw-r--r-- | internal/api/client/mutes/mutesget_test.go | 2 | ||||
-rw-r--r-- | internal/api/client/reports/reportget_test.go | 3 | ||||
-rw-r--r-- | internal/api/client/reports/reportsget_test.go | 12 | ||||
-rw-r--r-- | internal/api/client/statuses/statushistory_test.go | 3 | ||||
-rw-r--r-- | internal/api/client/statuses/statusmute_test.go | 6 |
9 files changed, 77 insertions, 39 deletions
diff --git a/internal/api/client/admin/accountsgetv2_test.go b/internal/api/client/admin/accountsgetv2_test.go index 489a245d0..0e3eb95e1 100644 --- a/internal/api/client/admin/accountsgetv2_test.go +++ b/internal/api/client/admin/accountsgetv2_test.go @@ -114,7 +114,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "verified_at": null } ], - "hide_collections": true + "hide_collections": true, + "group": false }, "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG" }, @@ -169,7 +170,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "name": "admin", "color": "" } - ] + ], + "group": false }, "created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F" }, @@ -216,7 +218,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "statuses_count": 0, "last_status_at": null, "emojis": [], - "fields": [] + "fields": [], + "group": false } }, { @@ -266,7 +269,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "last_status_at": "2024-11-01", "emojis": [], "fields": [], - "enable_rss": true + "enable_rss": true, + "group": false }, "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG" }, @@ -313,7 +317,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "statuses_count": 0, "last_status_at": null, "emojis": [], - "fields": [] + "fields": [], + "group": false }, "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG" }, @@ -360,7 +365,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "statuses_count": 1, "last_status_at": "2023-11-02", "emojis": [], - "fields": [] + "fields": [], + "group": false } }, { @@ -406,7 +412,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "statuses_count": 4, "last_status_at": "2024-11-01", "emojis": [], - "fields": [] + "fields": [], + "group": false } }, { @@ -453,7 +460,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "statuses_count": 0, "last_status_at": null, "emojis": [], - "fields": [] + "fields": [], + "group": false } }, { @@ -499,7 +507,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "statuses_count": 0, "last_status_at": null, "emojis": [], - "fields": [] + "fields": [], + "group": false } } ]`, dst.String()) @@ -584,7 +593,8 @@ func (suite *AccountsGetTestSuite) TestAccountsMinID() { "statuses_count": 0, "last_status_at": null, "emojis": [], - "fields": [] + "fields": [], + "group": false } } ]`, dst.String()) 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/followrequests/get_test.go b/internal/api/client/followrequests/get_test.go index c36253876..bf16a509e 100644 --- a/internal/api/client/followrequests/get_test.go +++ b/internal/api/client/followrequests/get_test.go @@ -103,7 +103,8 @@ func (suite *GetTestSuite) TestGet() { "statuses_count": 1, "last_status_at": "2023-11-02", "emojis": [], - "fields": [] + "fields": [], + "group": false } ]`, dst.String()) } diff --git a/internal/api/client/instance/instancepatch_test.go b/internal/api/client/instance/instancepatch_test.go index 47126e8b5..53df20b6b 100644 --- a/internal/api/client/instance/instancepatch_test.go +++ b/internal/api/client/instance/instancepatch_test.go @@ -191,7 +191,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch1() { "name": "admin", "color": "" } - ] + ], + "group": false }, "max_toot_chars": 5000, "rules": [ @@ -333,7 +334,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch2() { "name": "admin", "color": "" } - ] + ], + "group": false }, "max_toot_chars": 5000, "rules": [ @@ -475,7 +477,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch3() { "name": "admin", "color": "" } - ] + ], + "group": false }, "max_toot_chars": 5000, "rules": [ @@ -668,7 +671,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch6() { "name": "admin", "color": "" } - ] + ], + "group": false }, "max_toot_chars": 5000, "rules": [ @@ -836,7 +840,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch8() { "name": "admin", "color": "" } - ] + ], + "group": false }, "max_toot_chars": 5000, "rules": [ @@ -1015,7 +1020,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch9() { "name": "admin", "color": "" } - ] + ], + "group": false }, "max_toot_chars": 5000, "rules": [ diff --git a/internal/api/client/mutes/mutesget_test.go b/internal/api/client/mutes/mutesget_test.go index 13d826398..f9cfe5d9c 100644 --- a/internal/api/client/mutes/mutesget_test.go +++ b/internal/api/client/mutes/mutesget_test.go @@ -148,7 +148,7 @@ func (suite *MutesTestSuite) TestIndefinitelyMutedAccountSerializesMuteExpiratio // Fetch all muted accounts for the logged-in account. // The expected body contains `"mute_expires_at":null`. - _, err = suite.getMutedAccounts(http.StatusOK, `[{"id":"01F8MH5ZK5VRH73AKHQM6Y9VNX","username":"foss_satan","acct":"foss_satan@fossbros-anonymous.io","display_name":"big gerald","locked":false,"discoverable":true,"bot":false,"created_at":"2021-09-26T10:52:36.000Z","note":"i post about like, i dunno, stuff, or whatever!!!!","url":"http://fossbros-anonymous.io/@foss_satan","avatar":"","avatar_static":"","header":"http://localhost:8080/assets/default_header.webp","header_static":"http://localhost:8080/assets/default_header.webp","header_description":"Flat gray background (default header).","followers_count":0,"following_count":0,"statuses_count":4,"last_status_at":"2024-11-01","emojis":[],"fields":[],"mute_expires_at":null}]`) + _, err = suite.getMutedAccounts(http.StatusOK, `[{"id":"01F8MH5ZK5VRH73AKHQM6Y9VNX","username":"foss_satan","acct":"foss_satan@fossbros-anonymous.io","display_name":"big gerald","locked":false,"discoverable":true,"bot":false,"created_at":"2021-09-26T10:52:36.000Z","note":"i post about like, i dunno, stuff, or whatever!!!!","url":"http://fossbros-anonymous.io/@foss_satan","avatar":"","avatar_static":"","header":"http://localhost:8080/assets/default_header.webp","header_static":"http://localhost:8080/assets/default_header.webp","header_description":"Flat gray background (default header).","followers_count":0,"following_count":0,"statuses_count":4,"last_status_at":"2024-11-01","emojis":[],"fields":[],"group":false,"mute_expires_at":null}]`) if err != nil { suite.FailNow(err.Error()) } diff --git a/internal/api/client/reports/reportget_test.go b/internal/api/client/reports/reportget_test.go index afbcb2e28..51b80703d 100644 --- a/internal/api/client/reports/reportget_test.go +++ b/internal/api/client/reports/reportget_test.go @@ -133,7 +133,8 @@ func (suite *ReportGetTestSuite) TestGetReport1() { "statuses_count": 4, "last_status_at": "2024-11-01", "emojis": [], - "fields": [] + "fields": [], + "group": false } }`, string(b)) } diff --git a/internal/api/client/reports/reportsget_test.go b/internal/api/client/reports/reportsget_test.go index b5988e331..b6c3a0662 100644 --- a/internal/api/client/reports/reportsget_test.go +++ b/internal/api/client/reports/reportsget_test.go @@ -159,7 +159,8 @@ func (suite *ReportsGetTestSuite) TestGetReports() { "statuses_count": 4, "last_status_at": "2024-11-01", "emojis": [], - "fields": [] + "fields": [], + "group": false } } ]`, string(b)) @@ -250,7 +251,8 @@ func (suite *ReportsGetTestSuite) TestGetReports4() { "statuses_count": 4, "last_status_at": "2024-11-01", "emojis": [], - "fields": [] + "fields": [], + "group": false } } ]`, string(b)) @@ -325,7 +327,8 @@ func (suite *ReportsGetTestSuite) TestGetReports6() { "statuses_count": 4, "last_status_at": "2024-11-01", "emojis": [], - "fields": [] + "fields": [], + "group": false } } ]`, string(b)) @@ -384,7 +387,8 @@ func (suite *ReportsGetTestSuite) TestGetReports7() { "statuses_count": 4, "last_status_at": "2024-11-01", "emojis": [], - "fields": [] + "fields": [], + "group": false } } ]`, string(b)) 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": [], |