Sha256: 008be6371c0edf24a6fca243269ce3ba252a51b4aec53e941a9632aa63d54c3c

Contents?: true

Size: 955 Bytes

Versions: 6

Compression:

Stored size: 955 Bytes

Contents

require 'spec_helper'

module Spotlight
  describe 'spotlight/exhibits/edit', type: :view do
    let(:exhibit) { FactoryGirl.create(:exhibit) }
    before do
      assign(:exhibit, exhibit)
      allow(view).to receive_messages(current_exhibit: exhibit)
      allow(view).to receive_messages(can?: true)
      allow(view).to receive_messages(import_exhibit_path: '/')
      allow(view).to receive_messages(get_exhibit_path: '/')
      allow(view).to receive_messages(exhibit_filters_path: '/')
    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
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
blacklight-spotlight-0.19.0 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-0.18.0 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-0.17.1 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-0.17.0 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-0.16.0 spec/views/spotlight/exhibits/edit.html.erb_spec.rb
blacklight-spotlight-0.15.0 spec/views/spotlight/exhibits/edit.html.erb_spec.rb