Sha256: 324428279f193bccfcbf33700ca5fbe1928b2f8f6203d876686773883f678e17
Contents?: true
Size: 901 Bytes
Versions: 1
Compression:
Stored size: 901 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 'should return true when there is no exhibit context' do expect(helper.should_render_spotlight_search_bar?).to be_truthy end it 'should return 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 'should return 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
blacklight-spotlight-0.4.1 | spec/helpers/spotlight/navbar_helper_spec.rb |