Sha256: c92c092fba4aa24e8d7fbd06ca4c1b623d4450a4ab2fed0c2a7d6249cda8def3
Contents?: true
Size: 842 Bytes
Versions: 18
Compression:
Stored size: 842 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.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
18 entries across 18 versions & 1 rubygems