Sha256: c39d8f7d4a23971b44953f10201c4b1115620d4cfdae9c38a6748963cfa05339

Contents?: true

Size: 879 Bytes

Versions: 6

Compression:

Stored size: 879 Bytes

Contents

describe 'spotlight/exhibits/edit', type: :view do
  let(:exhibit) { FactoryBot.create(:exhibit) }
  before do
    assign(:exhibit, exhibit)
    allow(view).to receive_messages(
      current_exhibit: exhibit,
      can?: true,
      import_exhibit_path: '/',
      get_exhibit_path: '/',
      exhibit_filters_path: '/',
      exhibit_languages_path: '/',
      add_exhibit_language_dropdown_options: [],
      default_language?: true
    )
  end

  it 'renders the edit page form' do
    render

    expect(rendered).to have_selector "form[action=\"#{spotlight.exhibit_path(exhibit)}\"]"
    expect(rendered).to have_selector '.callout.callout-danger.row'
    expect(rendered).to have_content 'This action is irreversible'
    expect(rendered).to have_link 'Export data', href: spotlight.import_exhibit_path(exhibit)
    expect(rendered).to have_button 'Import data'
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
blacklight-spotlight-2.4.1 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-2.4.0 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-2.3.3 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-2.3.2 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-2.3.1 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-2.3.0 spec/views/spotlight/exhibits/edit.html.erb_spec.rb