Commit 5ece8a52 authored by Kerri Miller's avatar Kerri Miller

Merge branch 'add-basic-search-parameter-to-search' into 'master'

Add basic_search parameter to search API

See merge request gitlab-org/gitlab!45761
parents afcc180c b4a3e045
......@@ -35,6 +35,7 @@ module API
state: params[:state],
confidential: params[:confidential],
snippets: snippets?,
basic_search: params[:basic_search],
page: params[:page],
per_page: params[:per_page]
}.merge(additional_params)
......
......@@ -515,6 +515,14 @@ RSpec.describe API::Search do
end
end
context 'when requesting basic search' do
it 'passes the parameter to search service' do
expect(SearchService).to receive(:new).with(user, hash_including(basic_search: 'true'))
get api(endpoint, user), params: { scope: 'issues', search: 'awesome', basic_search: 'true' }
end
end
context 'for merge_requests scope' do
let(:endpoint) { "/projects/#{repo_project.id}/search" }
......
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