Sha256: be6c5cd28fca05daf75ed496d58ca21a1a1d33951b4df77fd0f2ed168c876994
Contents?: true
Size: 880 Bytes
Versions: 5
Compression:
Stored size: 880 Bytes
Contents
require 'spec_helper' module Spotlight describe 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 true when there is no exhibit context' do expect(helper.should_render_spotlight_search_bar?).to be_truthy 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 end
Version data entries
5 entries across 5 versions & 1 rubygems