diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-29 12:10:04 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-29 12:10:04 +0300 |
commit | e357d4951c53a3ce4f696cf533ce24a4c6350a7e (patch) | |
tree | d41e4e557c10c1ac7f32e108d67639c945ed539e /spec/services/search_service_spec.rb | |
parent | 2f0a7423ed75cdf30f5bcb9d3642f06d130b53b1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/search_service_spec.rb')
-rw-r--r-- | spec/services/search_service_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/services/search_service_spec.rb b/spec/services/search_service_spec.rb index 97d7ca6e1ad..77c160ccce2 100644 --- a/spec/services/search_service_spec.rb +++ b/spec/services/search_service_spec.rb @@ -151,7 +151,7 @@ describe SearchService do it 'returns the default scope' do scope = described_class.new(user, snippets: 'true', scope: 'projects').scope - expect(scope).to eq 'snippet_blobs' + expect(scope).to eq 'snippet_titles' end end @@ -159,7 +159,7 @@ describe SearchService do it 'returns the default scope' do scope = described_class.new(user, snippets: 'true').scope - expect(scope).to eq 'snippet_blobs' + expect(scope).to eq 'snippet_titles' end end end @@ -222,7 +222,7 @@ describe SearchService do search_results = described_class.new( user, snippets: 'true', - search: snippet.content).search_results + search: snippet.title).search_results expect(search_results).to be_a Gitlab::SnippetSearchResults end @@ -270,7 +270,7 @@ describe SearchService do search_objects = described_class.new( user, snippets: 'true', - search: snippet.content).search_objects + search: snippet.title).search_objects expect(search_objects.first).to eq snippet end @@ -383,7 +383,7 @@ describe SearchService do let(:readable) { create(:project_snippet, project: accessible_project) } let(:unreadable) { create(:project_snippet, project: inaccessible_project) } let(:unredacted_results) { ar_relation(ProjectSnippet, readable, unreadable) } - let(:scope) { 'snippet_blobs' } + let(:scope) { 'snippet_titles' } it 'redacts the inaccessible snippet' do expect(result).to contain_exactly(readable) @@ -394,7 +394,7 @@ describe SearchService do let(:readable) { create(:personal_snippet, :private, author: user) } let(:unreadable) { create(:personal_snippet, :private) } let(:unredacted_results) { ar_relation(PersonalSnippet, readable, unreadable) } - let(:scope) { 'snippet_blobs' } + let(:scope) { 'snippet_titles' } it 'redacts the inaccessible snippet' do expect(result).to contain_exactly(readable) |