Sha256: 12753122218d1c517f88618666648385f9c001d77e029caaffed0968ee570ebd
Contents?: true
Size: 902 Bytes
Versions: 4
Compression:
Stored size: 902 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) { |*args| args.first } end describe "Tags" do it "should be 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 "should be displayed" do render expect(rendered).to have_css("span.label.label-default", text: 2) end end end
Version data entries
4 entries across 4 versions & 1 rubygems