diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-01 18:09:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-01 18:09:28 +0300 |
commit | 893ba862a7808ac7099c0d5c6d6ad618ae4e2665 (patch) | |
tree | 1465b217b3111ddc7b0120bdbbce2ebc377f42fa /spec/views | |
parent | 7b2635a55d4e87431bae752bd44c6fd2d2657b03 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/search/_results.html.haml_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/views/search/_results.html.haml_spec.rb b/spec/views/search/_results.html.haml_spec.rb index 6299fd0cf36..c1c31084677 100644 --- a/spec/views/search/_results.html.haml_spec.rb +++ b/spec/views/search/_results.html.haml_spec.rb @@ -3,17 +3,23 @@ require 'spec_helper' RSpec.describe 'search/_results' do + let(:user) { create(:user) } let(:search_objects) { Issue.page(1).per(2) } let(:scope) { 'issues' } + let(:term) { 'foo' } before do controller.params[:action] = 'show' + controller.params[:search] = term create_list(:issue, 3) @search_objects = search_objects @scope = scope - @search_term = 'foo' + @search_term = term + @search_service = SearchServicePresenter.new(SearchService.new(user, search: term, scope: scope)) + + allow(@search_service).to receive(:search_objects).and_return(search_objects) end it 'displays the page size' do |