Sha256: d3be3983307792618492830d49a848e6d5315f799d819b947cb3f9161074aa4a

Contents?: true

Size: 819 Bytes

Versions: 18

Compression:

Stored size: 819 Bytes

Contents

# frozen_string_literal: true

describe 'spotlight/tags/index.html.erb', type: :view do
  let(:exhibit) { FactoryBot.create(:exhibit) }
  let!(:tag1) { FactoryBot.create(:tagging, tagger: exhibit, taggable: exhibit) }
  let!(:tag2) { FactoryBot.create(:tagging, tagger: exhibit, taggable: exhibit) }
  before do
    assign(:exhibit, exhibit)
    assign(:tags, exhibit.owned_tags)
    allow(view).to receive_messages(exhibit_tag_path: '/tags')
    allow(view).to receive(:current_exhibit).and_return(exhibit)
    allow(view).to receive(:url_to_tag_facet, &:first)
  end

  describe 'Tags' do
    it 'is displayed' do
      render
      [tag1.tag.name, tag2.tag.name].each do |name|
        expect(rendered).to have_css('td', text: name)
        expect(rendered).to have_link(name, href: 't')
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
blacklight-spotlight-3.0.0.alpha.2 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.1 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-2.13.0 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-2.12.1 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-2.12.0 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-2.11.0 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-2.10.0 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-2.9.0 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-2.8.0 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-2.7.2 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-2.7.1 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-2.7.0 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-2.6.1.1 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-2.6.1 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-2.6.0 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-2.5.2 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-2.5.1 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-2.5.0 spec/views/spotlight/tags/index.html.erb_spec.rb