From 6d811bcb14eb7199452d2673a6c30412989f7498 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 18 Dec 2019 14:07:36 +0100 Subject: Hide not allowed Reactions (#9387) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Hide not allowed Reactions * filter in query :D * use ` Co-Authored-By: Alexey 〒erentyev * update xorm v0.8.0 -> v0.8.1 --- integrations/api_issue_reaction_test.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'integrations/api_issue_reaction_test.go') diff --git a/integrations/api_issue_reaction_test.go b/integrations/api_issue_reaction_test.go index f3fcf3946f..c474f7bad2 100644 --- a/integrations/api_issue_reaction_test.go +++ b/integrations/api_issue_reaction_test.go @@ -26,7 +26,6 @@ func TestAPIIssuesReactions(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session) - user1 := models.AssertExistsAndLoadBean(t, &models.User{ID: 1}).(*models.User) user2 := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/reactions?token=%s", owner.Name, issue.Repo.Name, issue.Index, token) @@ -61,17 +60,12 @@ func TestAPIIssuesReactions(t *testing.T) { DecodeJSON(t, resp, &apiReactions) expectResponse := make(map[int]api.ReactionResponse) expectResponse[0] = api.ReactionResponse{ - User: user1.APIFormat(), - Reaction: "zzz", - Created: time.Unix(1573248002, 0), - } - expectResponse[1] = api.ReactionResponse{ User: user2.APIFormat(), Reaction: "eyes", Created: time.Unix(1573248003, 0), } - expectResponse[2] = apiNewReaction - assert.Len(t, apiReactions, 3) + expectResponse[1] = apiNewReaction + assert.Len(t, apiReactions, 2) for i, r := range apiReactions { assert.Equal(t, expectResponse[i].Reaction, r.Reaction) assert.Equal(t, expectResponse[i].Created.Unix(), r.Created.Unix()) -- cgit v1.2.3