Sha256: b320ecf2f2a19a09fa6dc7d2589fa6a72e191547f9c2cc2afc14bba6c8c804d1
Contents?: true
Size: 828 Bytes
Versions: 22
Compression:
Stored size: 828 Bytes
Contents
# frozen_string_literal: true describe Spotlight::NavbarHelper, type: :helper do describe '#should_render_search_bar?' do before do allow(helper).to receive_messages(current_exhibit: nil) allow(helper).to receive_messages(exhibit_masthead?: true) end it 'returns false when there is no exhibit context' do expect(helper).not_to be_should_render_spotlight_search_bar end it 'returns true if searchable' do allow(helper).to receive_messages(current_exhibit: double(searchable?: true)) expect(helper).to be_should_render_spotlight_search_bar end it 'returns false if currently under an "Exhibity" browse category' do allow(helper).to receive_messages(exhibit_masthead?: false) expect(helper).not_to be_should_render_spotlight_search_bar end end end
Version data entries
22 entries across 22 versions & 1 rubygems