Sha256: 3bb42d818e0c1cb28b3c976fa977b129c39bd35bfca131760c50d79e5d55e1a9

Contents?: true

Size: 870 Bytes

Versions: 9

Compression:

Stored size: 870 Bytes

Contents

require 'spec_helper'

module Spotlight
  describe 'spotlight/sites/edit_exhibits', type: :view do
    let!(:exhibit_a) { FactoryGirl.create(:exhibit) }
    let!(:exhibit_b) { FactoryGirl.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
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
blacklight-spotlight-0.19.0 spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb
blacklight-spotlight-0.18.0 spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb
blacklight-spotlight-0.17.1 spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb
blacklight-spotlight-0.17.0 spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb
blacklight-spotlight-0.16.0 spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb
blacklight-spotlight-0.15.0 spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb
blacklight-spotlight-0.14.2 spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb
blacklight-spotlight-0.14.1 spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb
blacklight-spotlight-0.14.0 spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb