Sha256: 35cc1a5885f6c7a3f29a899c6840523702392d52ffa2c0a43bd368fc87c24aae

Contents?: true

Size: 945 Bytes

Versions: 4

Compression:

Stored size: 945 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 "should render the configured partials" do
    allow(Spotlight::Engine.config).to receive(:new_resource_partials).and_return(['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

4 entries across 4 versions & 1 rubygems

Version Path
blacklight-spotlight-0.4.1 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.3.1 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.3.0 spec/views/spotlight/catalog/new.html.erb_spec.rb
blacklight-spotlight-0.2.0 spec/views/spotlight/catalog/new.html.erb_spec.rb