Sha256: a89232ebd8191dd7a10c3d4d8a9b13e1b7fa2b8c9e3a70ac221423bfbed9e32d
Contents?: true
Size: 1.16 KB
Versions: 18
Compression:
Stored size: 1.16 KB
Contents
# frozen_string_literal: true describe 'spotlight/resources/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(:resource_partials).and_return( %w( spotlight/resources/external_resources_form spotlight/resources/upload/form spotlight/resources/csv_upload/form ) ) stub_template 'spotlight/resources/_external_resources_form.html.erb' => 'a_template' stub_template 'spotlight/resources/upload/_form.html.erb' => 'b_template' stub_template 'spotlight/resources/csv_upload/_form.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
18 entries across 18 versions & 1 rubygems