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