Sha256: ea840ff0822cada1afc53ad4acae114c99979b36285d612f0cef240f1460b463

Contents?: true

Size: 677 Bytes

Versions: 9

Compression:

Stored size: 677 Bytes

Contents

# frozen_string_literal: true

describe 'spotlight/sir_trevor/blocks/_browse_block.html.erb', type: :view do
  let(:p) { 'spotlight/sir_trevor/blocks/browse_block' }
  let(:page) { double('Page', display_sidebar?: true) }
  let(:search) { FactoryBot.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

9 entries across 9 versions & 1 rubygems

Version Path
blacklight-spotlight-3.4.0 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-3.3.0 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-3.2.0 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-3.1.0 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-3.0.3 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-3.0.2 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-3.0.1 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-3.0.0 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc6 spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb