diff options
author | Paul Slaughter <pslaughter@gitlab.com> | 2019-04-05 10:29:53 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-04-05 10:29:53 +0300 |
commit | 59ac0924da8ffc6ae28eecffda2654cd7ab8f761 (patch) | |
tree | dd2740b77f9af61df459945e60bbd27c0b155140 /spec/finders/merge_requests_finder_spec.rb | |
parent | ff648879642f81ccb5eda7c70b9738916a185630 (diff) |
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/merge_requests_finder_spec.rb')
-rw-r--r-- | spec/finders/merge_requests_finder_spec.rb | 8 |
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' } |