Sha256: 12729712115994a5401cb28731fcf59be14c4c9e1e68e94b13569a81600f3947

Contents?: true

Size: 1.42 KB

Versions: 20

Compression:

Stored size: 1.42 KB

Contents

describe 'Catalog', type: :feature do
  describe 'admin' do
    let(:exhibit) { FactoryGirl.create(:exhibit) }
    let(:curator) { FactoryGirl.create(:exhibit_curator, exhibit: exhibit) }

    before do
      login_as curator
      d = SolrDocument.new(id: 'dq287tq6352')
      d.make_private! exhibit
      d.reindex
      Blacklight.default_index.connection.commit
    end

    after do
      d = SolrDocument.new(id: 'dq287tq6352')
      d.make_public! exhibit
      d.reindex
      Blacklight.default_index.connection.commit
    end

    it "has a 'Item Visiblity' facet" do
      visit spotlight.search_exhibit_catalog_path(exhibit)
      expect(page).to have_selector '.panel-title', text: 'Item Visibility'
    end
  end
  describe 'Non-spotlight #show' do
    it 'is able to render without exhibit context' do
      visit solr_document_path('dq287tq6352')
      expect(page).to have_css 'h1', text: "L'AMERIQUE"
    end
  end

  describe 'viewing the page' do
    let(:exhibit) { FactoryGirl.create(:exhibit) }
    it 'has <meta> tags' do
      TopHat.current['twitter_card'] = nil
      TopHat.current['opengraph'] = nil

      visit spotlight.exhibit_solr_document_path(exhibit, 'dq287tq6352')

      expect(page).to have_css "meta[name='twitter:title']", visible: false
      expect(page).to have_css "meta[property='og:site_name']", visible: false
      expect(page).to have_css "meta[property='og:title']", visible: false
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
blacklight-spotlight-1.0.0.alpha1 spec/features/catalog_spec.rb
blacklight-spotlight-0.34.1 spec/features/catalog_spec.rb
blacklight-spotlight-0.34.0 spec/features/catalog_spec.rb
blacklight-spotlight-0.33.3 spec/features/catalog_spec.rb
blacklight-spotlight-0.33.2 spec/features/catalog_spec.rb
blacklight-spotlight-0.33.1 spec/features/catalog_spec.rb
blacklight-spotlight-0.33.0 spec/features/catalog_spec.rb
blacklight-spotlight-0.32.0 spec/features/catalog_spec.rb
blacklight-spotlight-0.31.0 spec/features/catalog_spec.rb
blacklight-spotlight-0.30.0 spec/features/catalog_spec.rb
blacklight-spotlight-0.29.1 spec/features/catalog_spec.rb
blacklight-spotlight-0.29.0 spec/features/catalog_spec.rb
blacklight-spotlight-0.28.3 spec/features/catalog_spec.rb
blacklight-spotlight-0.28.2 spec/features/catalog_spec.rb
blacklight-spotlight-0.28.1 spec/features/catalog_spec.rb
blacklight-spotlight-0.28.0 spec/features/catalog_spec.rb
blacklight-spotlight-0.27.0 spec/features/catalog_spec.rb
blacklight-spotlight-0.26.1 spec/features/catalog_spec.rb
blacklight-spotlight-0.26.0 spec/features/catalog_spec.rb
blacklight-spotlight-0.25.0 spec/features/catalog_spec.rb