summaryrefslogtreecommitdiff
path: root/spec/controllers/search_controller_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-13 18:09:39 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-13 18:09:39 +0000
commit00fa950a34b1c94617110b150b8b2517d5241249 (patch)
tree8f2d8683879079da8f520f7867ebd49b8beaadef /spec/controllers/search_controller_spec.rb
parentc36152ff8c41fad2f413f253eb7ac5c927e47c56 (diff)
downloadgitlab-ce-00fa950a34b1c94617110b150b8b2517d5241249.tar.gz
Add latest changes from gitlab-org/gitlab@master
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)