Sha256: 2d369abba9fd0a42762d2c281a1834882bb22c4abcbbd93bb2193b71d0d4860d

Contents?: true

Size: 928 Bytes

Versions: 23

Compression:

Stored size: 928 Bytes

Contents

require 'spec_helper'

describe 'spotlight/catalog/new.html.erb', type: :view do
  let(:blacklight_config) { Blacklight::Configuration.new }
  let(:exhibit) { stub_model(Spotlight::Exhibit) }

  before do
    allow(view).to receive_messages(blacklight_config: blacklight_config)
    allow(view).to receive(:current_exhibit).and_return(exhibit)
    allow(view).to receive_messages(current_page?: true)
    stub_template 'spotlight/shared/_curation_sidebar.html.erb' => ''
  end

  it 'renders the configured partials' do
    allow(Spotlight::Engine.config).to receive(:new_resource_partials).and_return(%w(a b c))
    stub_template '_a.html.erb' => 'a_template'
    stub_template '_b.html.erb' => 'b_template'
    stub_template '_c.html.erb' => 'c_template'
    render
    expect(rendered).to have_content 'a_template'
    expect(rendered).to have_content 'b_template'
    expect(rendered).to have_content 'c_template'
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
blacklight-spotlight-0.15.0 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.14.2 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.14.1 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.14.0 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.13.0 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.12.1 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.12.0 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.11.0 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.10.3 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.10.2 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.10.1 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.10.0 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.9.2 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.9.1 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.9.0 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.8.2 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.8.1 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.8.0 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.7.2 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.7.1 spec/views/spotlight/catalog/new.html.erb_spec.rb