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.23.0 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.22.0 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.21.0 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.20.3 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.20.2 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.20.1 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.20.0 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.19.2 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.19.1 spec/features/tags_admin_spec.rb
blacklight-spotlight-0.19.0 spec/features/tags_admin_spec.rb