summaryrefslogtreecommitdiff
path: root/spec/requests/api/search_spec.rb
diff options
context:
space:
mode:
authorLee Tickett <lee@tickett.net>2019-05-17 06:10:08 +0000
committerLin Jen-Shin <godfat@godfat.org>2019-05-17 06:10:08 +0000
commita4e9259d8a39c0f1777af025fd7255dafb5d0e44 (patch)
treedd28b060b855813271073c72894927c82fda1076 /spec/requests/api/search_spec.rb
parentf7ebea045b6bb964072617efa5d4370f22badb7d (diff)
downloadgitlab-ce-a4e9259d8a39c0f1777af025fd7255dafb5d0e44.tar.gz
#46469 - Added ref querystring parameter to project search to allow searching on branches other than master
Diffstat (limited to 'spec/requests/api/search_spec.rb')
-rw-r--r--spec/requests/api/search_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/requests/api/search_spec.rb b/spec/requests/api/search_spec.rb
index 49672591b3b..7d61ec9c4d8 100644
--- a/spec/requests/api/search_spec.rb
+++ b/spec/requests/api/search_spec.rb
@@ -414,6 +414,13 @@ describe API::Search do
expect(response).to have_gitlab_http_status(200)
expect(json_response.size).to eq(11)
end
+
+ it 'by ref' do
+ get api("/projects/#{repo_project.id}/search", user), params: { scope: 'blobs', search: 'This file is used in tests for ci_environments_status', ref: 'pages-deploy' }
+
+ expect(response).to have_gitlab_http_status(200)
+ expect(json_response.size).to eq(1)
+ end
end
end
end