diff options
author | 2023-11-10 17:42:48 +0100 | |
---|---|---|
committer | 2023-11-10 16:42:48 +0000 | |
commit | c7ecab9e6fb76bb10da26c803fc5838419642423 (patch) | |
tree | 41410d639bdb8b19a93e972a6d05937f82ab4299 /internal/api/client/admin/emojicreate_test.go | |
parent | [bugfix] Don't try to update suspended accounts (#2348) (diff) | |
download | gotosocial-c7ecab9e6fb76bb10da26c803fc5838419642423.tar.xz |
[chore/bugfix/horror] Allow `expires_in` and poll choices to be parsed from strings (#2346)
Diffstat (limited to 'internal/api/client/admin/emojicreate_test.go')
-rw-r--r-- | internal/api/client/admin/emojicreate_test.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/internal/api/client/admin/emojicreate_test.go b/internal/api/client/admin/emojicreate_test.go index b312a593a..46139df47 100644 --- a/internal/api/client/admin/emojicreate_test.go +++ b/internal/api/client/admin/emojicreate_test.go @@ -39,9 +39,9 @@ func (suite *EmojiCreateTestSuite) TestEmojiCreateNewCategory() { // set up the request requestBody, w, err := testrig.CreateMultipartFormData( "image", "../../../../testrig/media/rainbow-original.png", - map[string]string{ - "shortcode": "new_emoji", - "category": "Test Emojis", // this category doesn't exist yet + map[string][]string{ + "shortcode": {"new_emoji"}, + "category": {"Test Emojis"}, // this category doesn't exist yet }) if err != nil { panic(err) @@ -112,9 +112,9 @@ func (suite *EmojiCreateTestSuite) TestEmojiCreateExistingCategory() { // set up the request requestBody, w, err := testrig.CreateMultipartFormData( "image", "../../../../testrig/media/rainbow-original.png", - map[string]string{ - "shortcode": "new_emoji", - "category": "cute stuff", // this category already exists + map[string][]string{ + "shortcode": {"new_emoji"}, + "category": {"cute stuff"}, // this category already exists }) if err != nil { panic(err) @@ -185,9 +185,9 @@ func (suite *EmojiCreateTestSuite) TestEmojiCreateNoCategory() { // set up the request requestBody, w, err := testrig.CreateMultipartFormData( "image", "../../../../testrig/media/rainbow-original.png", - map[string]string{ - "shortcode": "new_emoji", - "category": "", + map[string][]string{ + "shortcode": {"new_emoji"}, + "category": {""}, }) if err != nil { panic(err) @@ -258,8 +258,8 @@ func (suite *EmojiCreateTestSuite) TestEmojiCreateAlreadyExists() { // set up the request -- use a shortcode that already exists for an emoji in the database requestBody, w, err := testrig.CreateMultipartFormData( "image", "../../../../testrig/media/rainbow-original.png", - map[string]string{ - "shortcode": "rainbow", + map[string][]string{ + "shortcode": {"rainbow"}, }) if err != nil { panic(err) |