Sha256: 4723f273a8b3717aa683a933828c894a68da98975986c1e8955249fd1e53180b

Contents?: true

Size: 919 Bytes

Versions: 22

Compression:

Stored size: 919 Bytes

Contents

# frozen_string_literal: true

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 '.alert.alert-danger'
    expect(rendered).to have_content 'This action is irreversible'
    expect(rendered).to have_link 'Export data', href: spotlight.edit_exhibit_path(exhibit, anchor: 'export')
    expect(rendered).to have_button 'Import data'
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
blacklight-spotlight-3.4.0 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.3.0 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.2.0 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.1.0 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.0.3 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.0.2 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.0.1 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.0.0 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc6 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc5 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc4 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc3 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc2 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc1 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.10 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.9 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.8 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.7 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.6 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.5 spec/views/spotlight/exhibits/edit.html.erb_spec.rb