Sha256: 2d46c6e4bf6a27839a572853b61c1ae84192fb1fd079c6cc6a8d8cdf3f1ce380

Contents?: true

Size: 871 Bytes

Versions: 25

Compression:

Stored size: 871 Bytes

Contents

require 'spec_helper'

describe 'spotlight/tags/index.html.erb', type: :view do
  let(:exhibit) { FactoryGirl.create(:exhibit) }
  let!(:tag1) { FactoryGirl.create(:tagging, tagger: exhibit) }
  let!(:tag2) { FactoryGirl.create(:tagging, tagger: 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)
      end
    end
  end
  describe 'Total tags' do
    it 'is displayed' do
      render
      expect(rendered).to have_css('span.label.label-default', text: 2)
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
blacklight-spotlight-0.17.0 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.16.0 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.15.0 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.14.2 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.14.1 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.14.0 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.13.0 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.12.1 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.12.0 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.11.0 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.10.3 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.10.2 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.10.1 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.10.0 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.9.2 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.9.1 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.9.0 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.8.2 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.8.1 spec/views/spotlight/tags/index.html.erb_spec.rb
blacklight-spotlight-0.8.0 spec/views/spotlight/tags/index.html.erb_spec.rb