Sha256: b1fa9f39e9f8dd5ff9f018144f5594088e2e439c797aaf46f6d531dddc1e6ec5

Contents?: true

Size: 657 Bytes

Versions: 32

Compression:

Stored size: 657 Bytes

Contents

describe 'spotlight/sir_trevor/blocks/_browse_block.html.erb', type: :view do
  let(:p) { 'spotlight/sir_trevor/blocks/browse_block.html.erb' }
  let(:page) { double('Page', display_sidebar?: true) }
  let(:search) { FactoryGirl.create(:search) }
  let(:block) do
    assign(:page, page)
    SirTrevorRails::Blocks::BrowseBlock.new({ type: 'block', data: {} }, page)
  end

  before do
    allow(block).to receive(:searches).and_return([search])
  end

  it 'links to the search' do
    render partial: p, locals: { browse_block: block }
    expect(rendered).to have_link search.title, href: spotlight.exhibit_browse_path(search.exhibit, search)
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
blacklight-spotlight-1.0.0 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-1.0.0.alpha2 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-1.0.0.alpha1 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-0.34.1 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-0.34.0 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-0.33.3 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-0.33.2 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-0.33.1 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-0.33.0 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-0.32.0 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-0.31.0 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-0.30.0 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-0.29.1 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-0.29.0 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-0.28.3 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-0.28.2 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-0.28.1 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-0.28.0 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-0.27.0 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-0.26.1 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb