diff options
Diffstat (limited to 'internal/api/client/admin/emojicategoriesget_test.go')
-rw-r--r-- | internal/api/client/admin/emojicategoriesget_test.go | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/internal/api/client/admin/emojicategoriesget_test.go b/internal/api/client/admin/emojicategoriesget_test.go index 3c7e8eb3d..c9deca1dd 100644 --- a/internal/api/client/admin/emojicategoriesget_test.go +++ b/internal/api/client/admin/emojicategoriesget_test.go @@ -19,6 +19,8 @@ package admin_test import ( + "bytes" + "encoding/json" "io" "net/http" "net/http/httptest" @@ -44,8 +46,19 @@ func (suite *EmojiCategoriesGetTestSuite) TestEmojiCategoriesGet() { b, err := io.ReadAll(recorder.Body) suite.NoError(err) suite.NotNil(b) - - suite.Equal(`[{"id":"01GGQ989PTT9PMRN4FZ1WWK2B9","name":"cute stuff"},{"id":"01GGQ8V4993XK67B2JB396YFB7","name":"reactions"}]`, string(b)) + dst := new(bytes.Buffer) + err = json.Indent(dst, b, "", " ") + suite.NoError(err) + suite.Equal(`[ + { + "id": "01GGQ989PTT9PMRN4FZ1WWK2B9", + "name": "cute stuff" + }, + { + "id": "01GGQ8V4993XK67B2JB396YFB7", + "name": "reactions" + } +]`, dst.String()) } func TestEmojiCategoriesGetTestSuite(t *testing.T) { |