Sha256: f4cf8a57cd5d05db580b5a9c117e079c89fe50e9117034c481a0927344ce291a

Contents?: true

Size: 782 Bytes

Versions: 24

Compression:

Stored size: 782 Bytes

Contents

describe 'spotlight/sites/edit_exhibits', type: :view do
  let!(:exhibit_a) { FactoryBot.create(:exhibit) }
  let!(:exhibit_b) { FactoryBot.create(:exhibit) }

  before do
    assign(:site, Spotlight::Site.instance)
    allow(view).to receive_messages(exhibit_path: nil)
  end

  it 'has columns for the exhibit data' do
    render
    expect(rendered).to have_selector 'th', text: 'Title'
    expect(rendered).to have_selector 'th', text: 'Published?'
    expect(rendered).to have_selector 'th', text: 'Requested by'
    expect(rendered).to have_selector 'th', text: 'Created at'
    expect(rendered).to have_selector 'th', text: 'Updated at'
  end

  it 'has draggable rows for each exhibit' do
    render
    expect(rendered).to have_selector 'tr .dd-handle', count: 2
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
blacklight-spotlight-1.4.0 spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb
blacklight-spotlight-1.3.0 spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb
blacklight-spotlight-1.2.0 spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb
blacklight-spotlight-1.1.0 spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb