Sha256: fab7f69a44ba5a3d9ee8e6a56dca02e6c0e1412dfb8594442d0561179b39ace5
Contents?: true
Size: 810 Bytes
Versions: 47
Compression:
Stored size: 810 Bytes
Contents
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.should_render_spotlight_search_bar?).to be_falsey end it 'returns true if searchable' do allow(helper).to receive_messages(current_exhibit: double(searchable?: true)) expect(helper.should_render_spotlight_search_bar?).to be_truthy end it 'returns false if currently under an "Exhibity" browse category' do allow(helper).to receive_messages(exhibit_masthead?: false) expect(helper.should_render_spotlight_search_bar?).to be_falsey end end end
Version data entries
47 entries across 47 versions & 1 rubygems