summaryrefslogtreecommitdiff
path: root/spec/helpers/search_helper_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-19 09:06:27 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-19 09:06:27 +0000
commitb3e0658cb1fbc7c8e7dd381467c656f2e675ee46 (patch)
tree56f0231bca8a7f45bcd88da2b716e6b672e6f602 /spec/helpers/search_helper_spec.rb
parent82a534c245f830d7692d03c557075f211bec6e75 (diff)
downloadgitlab-ce-b3e0658cb1fbc7c8e7dd381467c656f2e675ee46.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers/search_helper_spec.rb')
-rw-r--r--spec/helpers/search_helper_spec.rb19
1 files changed, 13 insertions, 6 deletions
diff --git a/spec/helpers/search_helper_spec.rb b/spec/helpers/search_helper_spec.rb
index e1dc589236b..cc058d5b983 100644
--- a/spec/helpers/search_helper_spec.rb
+++ b/spec/helpers/search_helper_spec.rb
@@ -103,19 +103,17 @@ describe SearchHelper do
using RSpec::Parameterized::TableSyntax
where(:scope, :label) do
+ 'blobs' | 'code result'
'commits' | 'commit'
'issues' | 'issue'
'merge_requests' | 'merge request'
'milestones' | 'milestone'
+ 'notes' | 'comment'
'projects' | 'project'
+ 'snippet_blobs' | 'snippet result'
'snippet_titles' | 'snippet'
'users' | 'user'
-
- 'blobs' | 'result'
- 'snippet_blobs' | 'result'
- 'wiki_blobs' | 'result'
-
- 'notes' | 'comment'
+ 'wiki_blobs' | 'wiki result'
end
with_them do
@@ -140,6 +138,15 @@ describe SearchHelper do
end
end
+ describe 'search_entries_empty_message' do
+ it 'returns the formatted entry message' do
+ message = search_entries_empty_message('projects', 'foo')
+
+ expect(message).to eq("We couldn't find any projects matching <code>foo</code>")
+ expect(message).to be_html_safe
+ end
+ end
+
describe 'search_filter_input_options' do
context 'project' do
before do