summaryrefslogtreecommitdiff
path: root/spec/finders
diff options
context:
space:
mode:
authorPaul Slaughter <pslaughter@gitlab.com>2019-04-05 07:29:53 +0000
committerPhil Hughes <me@iamphill.com>2019-04-05 07:29:53 +0000
commit59ac0924da8ffc6ae28eecffda2654cd7ab8f761 (patch)
treedd2740b77f9af61df459945e60bbd27c0b155140 /spec/finders
parentff648879642f81ccb5eda7c70b9738916a185630 (diff)
downloadgitlab-ce-59ac0924da8ffc6ae28eecffda2654cd7ab8f761.tar.gz
Fix IDE detecting MR from fork branch
**Why?** Currently the IDE loads a merge request based on only the `source_branch` name. This means it loads MR's from forks that have the same branch name (not good). - This required updating the BE API to accept `source_project_id`
Diffstat (limited to 'spec/finders')
-rw-r--r--spec/finders/merge_requests_finder_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/finders/merge_requests_finder_spec.rb b/spec/finders/merge_requests_finder_spec.rb
index 56136eb84bc..f508b9bdb6f 100644
--- a/spec/finders/merge_requests_finder_spec.rb
+++ b/spec/finders/merge_requests_finder_spec.rb
@@ -83,6 +83,14 @@ describe MergeRequestsFinder do
expect(merge_requests).to contain_exactly(merge_request2)
end
+ it 'filters by source project id' do
+ params = { source_project_id: merge_request2.source_project_id }
+
+ merge_requests = described_class.new(user, params).execute
+
+ expect(merge_requests).to contain_exactly(merge_request1, merge_request2, merge_request3)
+ end
+
it 'filters by state' do
params = { state: 'locked' }