diff options
author | Hiroyuki Sato <sathiroyuki@gmail.com> | 2017-09-03 16:34:50 +0900 |
---|---|---|
committer | Hiroyuki Sato <sathiroyuki@gmail.com> | 2017-09-05 11:56:17 +0900 |
commit | cf9c54bd312dcb7b4b7f0602e83013d8d32a9413 (patch) | |
tree | 2399ac0f228e6e02c6dd429d167aa131a4ae5f68 /spec | |
parent | 597bc29260c4be3a1527a1c5307bec40004bac4d (diff) | |
download | gitlab-ce-cf9c54bd312dcb7b4b7f0602e83013d8d32a9413.tar.gz |
Add my_reaction_emoji param to /issues API
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/issues_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb index dee75c96b86..1583d1c2435 100644 --- a/spec/requests/api/issues_spec.rb +++ b/spec/requests/api/issues_spec.rb @@ -138,6 +138,16 @@ describe API::Issues, :mailer do expect(first_issue['id']).to eq(issue2.id) end + it 'returns issues reacted by the authenticated user by the given emoji' do + issue2 = create(:issue, project: project, author: user, assignees: [user]) + award_emoji = create(:award_emoji, awardable: issue2, user: user2, name: 'star') + + get api('/issues', user2), my_reaction_emoji: award_emoji.name, scope: 'all' + + expect_paginated_array_response(size: 1) + expect(first_issue['id']).to eq(issue2.id) + end + it 'returns issues matching given search string for title' do get api("/issues", user), search: issue.title |