Commit 724b645a authored by Terri Chu's avatar Terri Chu Committed by Mayra Cabrera

Remove source_project_id from basic search for merge requests

parent e9b0b551
......@@ -188,7 +188,7 @@ module Gitlab
merge_requests = MergeRequestsFinder.new(current_user, issuable_params).execute
unless default_project_filter
merge_requests = merge_requests.in_projects(project_ids_relation)
merge_requests = merge_requests.of_projects(project_ids_relation)
end
apply_sort(merge_requests, scope: 'merge_requests')
......
......@@ -144,13 +144,13 @@ RSpec.describe Gitlab::SearchResults do
end
end
it 'includes merge requests from source and target projects' do
it 'does not include merge requests from source projects' do
forked_project = fork_project(project, user)
merge_request_2 = create(:merge_request, target_project: project, source_project: forked_project, title: 'foo')
results = described_class.new(user, 'foo', Project.where(id: forked_project.id))
expect(results.objects('merge_requests')).to include merge_request_2
expect(results.objects('merge_requests')).not_to include merge_request_2
end
describe '#merge_requests' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment