diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-30 18:08:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-30 18:08:09 +0300 |
commit | 538fff823de57d1ba5317961aa43091de9dc007f (patch) | |
tree | c741665b338cc0d51ce5f73f5671e5eee8e69349 /spec/lib/gitlab/snippet_search_results_spec.rb | |
parent | 3692e9f8a23386c627942ca2a9edd8c00af7e904 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/snippet_search_results_spec.rb')
-rw-r--r-- | spec/lib/gitlab/snippet_search_results_spec.rb | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/spec/lib/gitlab/snippet_search_results_spec.rb b/spec/lib/gitlab/snippet_search_results_spec.rb index d3353b76c15..47f26fdebe2 100644 --- a/spec/lib/gitlab/snippet_search_results_spec.rb +++ b/spec/lib/gitlab/snippet_search_results_spec.rb @@ -6,18 +6,17 @@ describe Gitlab::SnippetSearchResults do include SearchHelpers let!(:snippet) { create(:snippet, content: 'foo', file_name: 'foo') } - - let(:results) { described_class.new(Snippet.all, 'foo') } + let(:results) { described_class.new(snippet.author, 'foo') } describe '#snippet_titles_count' do it 'returns the amount of matched snippet titles' do - expect(results.snippet_titles_count).to eq(1) + expect(results.limited_snippet_titles_count).to eq(1) end end describe '#snippet_blobs_count' do it 'returns the amount of matched snippet blobs' do - expect(results.snippet_blobs_count).to eq(1) + expect(results.limited_snippet_blobs_count).to eq(1) end end @@ -25,10 +24,10 @@ describe Gitlab::SnippetSearchResults do using RSpec::Parameterized::TableSyntax where(:scope, :count_method, :expected) do - 'snippet_titles' | :snippet_titles_count | '1234' - 'snippet_blobs' | :snippet_blobs_count | '1234' - 'projects' | :limited_projects_count | max_limited_count - 'unknown' | nil | nil + 'snippet_titles' | :limited_snippet_titles_count | max_limited_count + 'snippet_blobs' | :limited_snippet_blobs_count | max_limited_count + 'projects' | :limited_projects_count | max_limited_count + 'unknown' | nil | nil end with_them do |