aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/api_issue_reaction_test.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-06-22 20:21:31 +0200
committerGitHub <noreply@github.com>2020-06-22 14:21:31 -0400
commitfc2f2c7602c0bea8de76172f6d3303eab374a01e (patch)
treea3cbccd543b846ff5410248caf5110022bfc38ca /integrations/api_issue_reaction_test.go
parentb948ecb2d29bfe373d966d10a33e7c195eb47da4 (diff)
downloadgitea-fc2f2c7602c0bea8de76172f6d3303eab374a01e.tar.gz
gitea-fc2f2c7602c0bea8de76172f6d3303eab374a01e.zip
API: Move AllowedReactions endpoint into GetGenneralUI endpoint + creat new swagger section settings (#11854)
* move Setting function into its own package * swagger add&use new section "settings" * move api AllowedReactions into general UI-Settings endpoint * prepare TEST * lint
Diffstat (limited to 'integrations/api_issue_reaction_test.go')
-rw-r--r--integrations/api_issue_reaction_test.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/integrations/api_issue_reaction_test.go b/integrations/api_issue_reaction_test.go
index ab3de7c116..abbc6429fb 100644
--- a/integrations/api_issue_reaction_test.go
+++ b/integrations/api_issue_reaction_test.go
@@ -20,16 +20,14 @@ import (
func TestAPIAllowedReactions(t *testing.T) {
defer prepareTestEnv(t)()
- type allowed []string
+ a := new(api.GeneralUISettings)
- a := new(allowed)
-
- req := NewRequest(t, "GET", "/api/v1/settings/allowed_reactions")
+ req := NewRequest(t, "GET", "/api/v1/settings/ui")
resp := MakeRequest(t, req, http.StatusOK)
DecodeJSON(t, resp, &a)
- assert.Len(t, *a, len(setting.UI.Reactions))
- assert.ElementsMatch(t, setting.UI.Reactions, *a)
+ assert.Len(t, a.AllowedReactions, len(setting.UI.Reactions))
+ assert.ElementsMatch(t, setting.UI.Reactions, a.AllowedReactions)
}
func TestAPIIssuesReactions(t *testing.T) {