summaryrefslogtreecommitdiff
path: root/spec/controllers/search_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/search_controller_spec.rb')
-rw-r--r--spec/controllers/search_controller_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/controllers/search_controller_spec.rb b/spec/controllers/search_controller_spec.rb
index 19786417d76..1fe313452fe 100644
--- a/spec/controllers/search_controller_spec.rb
+++ b/spec/controllers/search_controller_spec.rb
@@ -140,6 +140,14 @@ describe SearchController do
end
end
+ context 'snippet search' do
+ it 'forces title search' do
+ get :show, params: { scope: 'snippet_blobs', snippets: 'true', search: 'foo' }
+
+ expect(assigns[:scope]).to eq('snippet_titles')
+ end
+ end
+
it 'finds issue comments' do
project = create(:project, :public)
note = create(:note_on_issue, project: project)