diff options
Diffstat (limited to 'internal/api')
-rw-r--r-- | internal/api/client/accounts/profile_test.go | 4 | ||||
-rw-r--r-- | internal/api/client/admin/accountsgetv2_test.go | 32 | ||||
-rw-r--r-- | internal/api/client/admin/reportsget_test.go | 52 | ||||
-rw-r--r-- | internal/api/client/followrequests/get_test.go | 4 | ||||
-rw-r--r-- | internal/api/client/instance/instancepatch_test.go | 34 | ||||
-rw-r--r-- | internal/api/client/mutes/mutesget_test.go | 2 | ||||
-rw-r--r-- | internal/api/client/reports/reportget_test.go | 4 | ||||
-rw-r--r-- | internal/api/client/reports/reportsget_test.go | 16 |
8 files changed, 74 insertions, 74 deletions
diff --git a/internal/api/client/accounts/profile_test.go b/internal/api/client/accounts/profile_test.go index 62a622b37..f6d97c014 100644 --- a/internal/api/client/accounts/profile_test.go +++ b/internal/api/client/accounts/profile_test.go @@ -119,7 +119,7 @@ func (suite *AccountProfileTestSuite) TestDeleteHeader() { http.StatusOK, ) if suite.NoError(err) { - suite.Equal("http://localhost:8080/assets/default_header.png", account.Header) + suite.Equal("http://localhost:8080/assets/default_header.webp", account.Header) } } @@ -132,7 +132,7 @@ func (suite *AccountProfileTestSuite) TestDeleteNonexistentHeader() { http.StatusOK, ) if suite.NoError(err) { - suite.Equal("http://localhost:8080/assets/default_header.png", account.Header) + suite.Equal("http://localhost:8080/assets/default_header.webp", account.Header) } } diff --git a/internal/api/client/admin/accountsgetv2_test.go b/internal/api/client/admin/accountsgetv2_test.go index acf12fd31..15eb8534b 100644 --- a/internal/api/client/admin/accountsgetv2_test.go +++ b/internal/api/client/admin/accountsgetv2_test.go @@ -90,8 +90,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "url": "http://localhost:8080/@1happyturtle", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 8, @@ -147,8 +147,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -193,8 +193,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "url": "http://localhost:8080/@localhost:8080", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 0, @@ -282,8 +282,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "url": "http://localhost:8080/@weed_lord420", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 0, @@ -327,8 +327,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "url": "http://example.org/@Some_User", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 1, @@ -368,8 +368,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -451,8 +451,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "url": "https://xn--xample-ova.org/users/@%C3%BCser", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 0, @@ -531,8 +531,8 @@ func (suite *AccountsGetTestSuite) TestAccountsMinID() { "url": "http://localhost:8080/@localhost:8080", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 0, diff --git a/internal/api/client/admin/reportsget_test.go b/internal/api/client/admin/reportsget_test.go index ea5375314..ebcd799f8 100644 --- a/internal/api/client/admin/reportsget_test.go +++ b/internal/api/client/admin/reportsget_test.go @@ -177,8 +177,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -218,8 +218,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "url": "http://localhost:8080/@1happyturtle", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 8, @@ -275,8 +275,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -321,8 +321,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -380,8 +380,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "url": "http://localhost:8080/@1happyturtle", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 8, @@ -437,8 +437,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -484,8 +484,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -622,8 +622,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetCreatedByAccount() { "url": "http://localhost:8080/@1happyturtle", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 8, @@ -679,8 +679,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetCreatedByAccount() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -726,8 +726,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetCreatedByAccount() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -864,8 +864,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetTargetAccount() { "url": "http://localhost:8080/@1happyturtle", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 8, @@ -921,8 +921,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetTargetAccount() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -968,8 +968,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetTargetAccount() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, diff --git a/internal/api/client/followrequests/get_test.go b/internal/api/client/followrequests/get_test.go index 35e4488c3..b9b6db7c6 100644 --- a/internal/api/client/followrequests/get_test.go +++ b/internal/api/client/followrequests/get_test.go @@ -95,8 +95,8 @@ func (suite *GetTestSuite) TestGet() { "url": "http://example.org/@Some_User", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 1, diff --git a/internal/api/client/instance/instancepatch_test.go b/internal/api/client/instance/instancepatch_test.go index 65a10d192..ba0d026f3 100644 --- a/internal/api/client/instance/instancepatch_test.go +++ b/internal/api/client/instance/instancepatch_test.go @@ -151,7 +151,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch1() { "status_count": 20, "user_count": 4 }, - "thumbnail": "http://localhost:8080/assets/logo.png", + "thumbnail": "http://localhost:8080/assets/logo.webp", "contact_account": { "id": "01F8MH17FWEB39HZJ76B6VXSKF", "username": "admin", @@ -165,8 +165,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch1() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -285,7 +285,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch2() { "status_count": 20, "user_count": 4 }, - "thumbnail": "http://localhost:8080/assets/logo.png", + "thumbnail": "http://localhost:8080/assets/logo.webp", "contact_account": { "id": "01F8MH17FWEB39HZJ76B6VXSKF", "username": "admin", @@ -299,8 +299,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch2() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -419,7 +419,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch3() { "status_count": 20, "user_count": 4 }, - "thumbnail": "http://localhost:8080/assets/logo.png", + "thumbnail": "http://localhost:8080/assets/logo.webp", "contact_account": { "id": "01F8MH17FWEB39HZJ76B6VXSKF", "username": "admin", @@ -433,8 +433,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch3() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -604,7 +604,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch6() { "status_count": 20, "user_count": 4 }, - "thumbnail": "http://localhost:8080/assets/logo.png", + "thumbnail": "http://localhost:8080/assets/logo.webp", "contact_account": { "id": "01F8MH17FWEB39HZJ76B6VXSKF", "username": "admin", @@ -618,8 +618,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch6() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -776,8 +776,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch8() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -931,7 +931,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch9() { "status_count": 20, "user_count": 4 }, - "thumbnail": "http://localhost:8080/assets/logo.png", + "thumbnail": "http://localhost:8080/assets/logo.webp", "contact_account": { "id": "01F8MH17FWEB39HZJ76B6VXSKF", "username": "admin", @@ -945,8 +945,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch9() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, diff --git a/internal/api/client/mutes/mutesget_test.go b/internal/api/client/mutes/mutesget_test.go index 2e5a00c6a..9939174a0 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.png","header_static":"http://localhost:8080/assets/default_header.png","followers_count":0,"following_count":0,"statuses_count":3,"last_status_at":"2021-09-11T09:40:37.000Z","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","followers_count":0,"following_count":0,"statuses_count":3,"last_status_at":"2021-09-11T09:40:37.000Z","emojis":[],"fields":[],"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 4f01101b2..6b0cf89e0 100644 --- a/internal/api/client/reports/reportget_test.go +++ b/internal/api/client/reports/reportget_test.go @@ -125,8 +125,8 @@ func (suite *ReportGetTestSuite) TestGetReport1() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, diff --git a/internal/api/client/reports/reportsget_test.go b/internal/api/client/reports/reportsget_test.go index 2413292a0..96fcafc22 100644 --- a/internal/api/client/reports/reportsget_test.go +++ b/internal/api/client/reports/reportsget_test.go @@ -151,8 +151,8 @@ func (suite *ReportsGetTestSuite) TestGetReports() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -241,8 +241,8 @@ func (suite *ReportsGetTestSuite) TestGetReports4() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -315,8 +315,8 @@ func (suite *ReportsGetTestSuite) TestGetReports6() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -373,8 +373,8 @@ func (suite *ReportsGetTestSuite) TestGetReports7() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, |