summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-02-17 18:32:10 +0000
committerRémy Coutable <remy@rymai.me>2017-02-17 18:32:10 +0000
commitb43cb21ddec69711d256c00bab95b7459820960e (patch)
tree9e950e0716d6b2eb42afdd0ed3af03982e0c08d8 /spec
parent668dfa02329a94cdf5f811ef3eca1ba5389066bc (diff)
parent7362fd6fdf4704314acbe9760a329ffe23337af0 (diff)
downloadgitlab-ce-b43cb21ddec69711d256c00bab95b7459820960e.tar.gz
Merge branch '26379-iid-param' into 'master'
add a :iid param to the IssuableFinder Closes #26379 See merge request !9222
Diffstat (limited to 'spec')
-rw-r--r--spec/finders/issues_finder_spec.rb6
-rw-r--r--spec/finders/merge_requests_finder_spec.rb8
2 files changed, 11 insertions, 3 deletions
diff --git a/spec/finders/issues_finder_spec.rb b/spec/finders/issues_finder_spec.rb
index 12ab1d6dde8..2a008427478 100644
--- a/spec/finders/issues_finder_spec.rb
+++ b/spec/finders/issues_finder_spec.rb
@@ -136,10 +136,10 @@ describe IssuesFinder do
end
end
- context 'filtering by issue iid' do
- let(:params) { { search: issue3.to_reference } }
+ context 'filtering by issues iids' do
+ let(:params) { { iids: issue3.iid } }
- it 'returns issue with iid match' do
+ it 'returns issues with iids match' do
expect(issues).to contain_exactly(issue3)
end
end
diff --git a/spec/finders/merge_requests_finder_spec.rb b/spec/finders/merge_requests_finder_spec.rb
index 3dcd7781e5b..21ef94ac5d1 100644
--- a/spec/finders/merge_requests_finder_spec.rb
+++ b/spec/finders/merge_requests_finder_spec.rb
@@ -38,5 +38,13 @@ describe MergeRequestsFinder do
merge_requests = MergeRequestsFinder.new(user, params).execute
expect(merge_requests.size).to eq(3)
end
+
+ it 'filters by iid' do
+ params = { project_id: project1.id, iids: merge_request1.iid }
+
+ merge_requests = MergeRequestsFinder.new(user, params).execute
+
+ expect(merge_requests).to contain_exactly(merge_request1)
+ end
end
end