Sha256: 688c4fda4e8ab9699349a5f9ee04a5b9c7b60aecca7ced17e483c457d8ac1a92
Contents?: true
Size: 965 Bytes
Versions: 32
Compression:
Stored size: 965 Bytes
Contents
describe 'spotlight/exhibits/_exhibit_card_front.html.erb', type: :view do let(:exhibit) { FactoryGirl.create(:exhibit) } let(:p) { 'spotlight/exhibits/exhibit_card_front' } context 'for an exhibit without a thumbnail' do before do exhibit.update(thumbnail_id: nil) end it 'has a placeholder thumbnail' do render p, exhibit: exhibit expect(rendered).to have_selector 'img.default-thumbnail' end end it 'has a thumbnail' do render p, exhibit: exhibit expect(rendered).to have_selector 'img' end it 'has a title' do render p, exhibit: exhibit expect(rendered).to have_selector '.card-title', text: exhibit.title end context 'for an unpublished exhibit' do before do exhibit.update(published: false) end it 'has an unpublished banner' do render p, exhibit: exhibit expect(rendered).to have_selector '.label.unpublished', text: 'Unpublished' end end end
Version data entries
32 entries across 32 versions & 1 rubygems