Sha256: ad273870281b2b7b942507f2a4d2e9563eef8ef31c42d9db0cd4ec40dc5b5bc3

Contents?: true

Size: 902 Bytes

Versions: 22

Compression:

Stored size: 902 Bytes

Contents

require 'spec_helper'

describe 'Tags Administration', type: :feature do
  let(:exhibit) { FactoryGirl.create(:exhibit) }
  let!(:tagging) { FactoryGirl.create(:tagging, tagger: exhibit) }
  let(:exhibit_curator) { FactoryGirl.create(:exhibit_curator, exhibit: exhibit) }
  before { login_as exhibit_curator }

  describe 'index' do
    it 'has tags' do
      visit spotlight.exhibit_tags_path(exhibit)
      expect(page).to have_css('td', text: tagging.tag.name)
    end

    it 'links tags to a search' do
      visit spotlight.exhibit_tags_path(exhibit)
      click_on tagging.tag.name
      expect(page).to have_content "Remove constraint Exhibit Tags: #{tagging.tag.name}"
    end
  end

  describe 'destroy' do
    it 'destroys a tag' do
      visit spotlight.exhibit_tags_path(exhibit)
      click_link 'Delete'
      expect(page).not_to have_css('td', text: tagging.tag.name)
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
blacklight-spotlight-0.18.0 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.17.1 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.17.0 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.16.0 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.15.0 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.14.2 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.14.1 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.14.0 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.13.0 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.12.1 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.12.0 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.11.0 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.10.3 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.10.2 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.10.1 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.10.0 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.9.2 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.9.1 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.9.0 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.8.2 spec/features/tags_admin_spec.rb