File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,30 @@ import (
11
11
"time"
12
12
13
13
"code.gitea.io/gitea/models"
14
+ "code.gitea.io/gitea/modules/setting"
14
15
api "code.gitea.io/gitea/modules/structs"
15
16
16
17
"github.com/stretchr/testify/assert"
17
18
)
18
19
20
+ func TestAPIAllowedReactions (t * testing.T ) {
21
+ defer prepareTestEnv (t )()
22
+
23
+ type allowed []string
24
+
25
+ a := new (allowed )
26
+
27
+ req := NewRequest (t , "GET" , "/api/v1/settings/allowed_reactions" )
28
+ resp := MakeRequest (t , req , http .StatusOK )
29
+
30
+ DecodeJSON (t , resp , & a )
31
+ assert .Len (t , * a , len (setting .UI .Reactions ))
32
+
33
+ for _ , r := range * a {
34
+ assert .True (t , setting .UI .ReactionsMap [r ])
35
+ }
36
+ }
37
+
19
38
func TestAPIIssuesReactions (t * testing.T ) {
20
39
defer prepareTestEnv (t )()
21
40
You can’t perform that action at this time.
0 commit comments