Sha256: 890c4d0257feb8f28633c716f57e66237ab17783968c6a47cb6a4fa2b6a0b842

Contents?: true

Size: 879 Bytes

Versions: 30

Compression:

Stored size: 879 Bytes

Contents

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

30 entries across 30 versions & 1 rubygems

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