diff options
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/search_controller_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/controllers/search_controller_spec.rb b/spec/controllers/search_controller_spec.rb index 7fce39950e5..9e69566d18f 100644 --- a/spec/controllers/search_controller_spec.rb +++ b/spec/controllers/search_controller_spec.rb @@ -477,6 +477,12 @@ RSpec.describe SearchController, feature_category: :global_search do expect(json_response.first['label']).to match(/User settings/) end + it 'can be scoped with params[:scope]' do + expect(controller).to receive(:search_autocomplete_opts).with('setting', filter: nil, scope: 'project') + + get :autocomplete, params: { term: 'setting', scope: 'project' } + end + it 'makes a call to search_autocomplete_opts' do expect(controller).to receive(:search_autocomplete_opts).once |