summaryrefslogtreecommitdiff
path: root/spec/finders
diff options
context:
space:
mode:
authorHeinrich Lee Yu <hleeyu@gmail.com>2018-10-27 11:18:31 +0800
committerHeinrich Lee Yu <hleeyu@gmail.com>2018-11-01 07:45:36 +0800
commit385524c3ea7bde5cac889776b08a7287e241387f (patch)
tree45dbd633119efcaaff3fc76e8865d1ef6df35ca4 /spec/finders
parent4f53ab13c6b1f7327b7df3e584ef3786bf8f5641 (diff)
downloadgitlab-ce-385524c3ea7bde5cac889776b08a7287e241387f.tar.gz
Add tests
Diffstat (limited to 'spec/finders')
-rw-r--r--spec/finders/issues_finder_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/finders/issues_finder_spec.rb b/spec/finders/issues_finder_spec.rb
index 2f164ffa8b0..490cfdfe116 100644
--- a/spec/finders/issues_finder_spec.rb
+++ b/spec/finders/issues_finder_spec.rb
@@ -360,6 +360,22 @@ describe IssuesFinder do
end
context 'filtering by reaction name' do
+ context 'user searches by no reaction' do
+ let(:params) { { my_reaction_emoji: 'None' } }
+
+ it 'returns issues that the user did not react to' do
+ expect(issues).to contain_exactly(issue2, issue4)
+ end
+ end
+
+ context 'user searches by any reaction' do
+ let(:params) { { my_reaction_emoji: 'Any' } }
+
+ it 'returns issues that the user reacted to' do
+ expect(issues).to contain_exactly(issue1, issue3)
+ end
+ end
+
context 'user searches by "thumbsup" reaction' do
let(:params) { { my_reaction_emoji: 'thumbsup' } }