diff options
Diffstat (limited to 'spec/views/search/_results.html.haml_spec.rb')
-rw-r--r-- | spec/views/search/_results.html.haml_spec.rb | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/spec/views/search/_results.html.haml_spec.rb b/spec/views/search/_results.html.haml_spec.rb index de994a0da2b..ed71a03c7e0 100644 --- a/spec/views/search/_results.html.haml_spec.rb +++ b/spec/views/search/_results.html.haml_spec.rb @@ -3,8 +3,6 @@ require 'spec_helper' RSpec.describe 'search/_results', feature_category: :global_search do - using RSpec::Parameterized::TableSyntax - let_it_be(:user) { create(:user) } let(:search_objects) { Issue.page(1).per(2) } @@ -32,30 +30,22 @@ RSpec.describe 'search/_results', feature_category: :global_search do assign(:search_service_presenter, search_service_presenter) end - where(search_page_vertical_nav_enabled: [true, false]) + describe 'page size' do + context 'when search results have a count' do + it 'displays the page size' do + render - with_them do - describe 'page size' do - before do - stub_feature_flags(search_page_vertical_nav: search_page_vertical_nav_enabled) - end - - context 'when search results have a count' do - it 'displays the page size' do - render - - expect(rendered).to have_content('Showing 1 - 2 of 3 issues for foo') - end + expect(rendered).to have_content('Showing 1 - 2 of 3 issues for foo') end + end - context 'when search results do not have a count' do - let(:search_objects) { Issue.page(1).per(2).without_count } + context 'when search results do not have a count' do + let(:search_objects) { Issue.page(1).per(2).without_count } - it 'does not display the page size' do - render + it 'does not display the page size' do + render - expect(rendered).not_to have_content(/Showing .* of .*/) - end + expect(rendered).not_to have_content(/Showing .* of .*/) end end end |