Sha256: 6a5688bdc9f19e3e24f96d8d8070fff090c805160afeff325a4a3a26d45f949c
Contents?: true
Size: 735 Bytes
Versions: 12
Compression:
Stored size: 735 Bytes
Contents
require 'rails_helper' describe "manifestations/show" do fixtures :all before(:each) do assign(:manifestation, FactoryBot.create(:item).manifestation) allow(view).to receive(:policy).and_return double(create?: false, udpate?: false, destroy?: false) end describe "when logged in as Librarian" do before(:each) do user = assign(:profile, FactoryBot.create(:librarian)) view.stub(:current_user).and_return(user) allow(view).to receive(:policy).and_return double(create?: true, update?: true, destroy?: true) end it "should have the total number of checkouts" do render expect(rendered).to have_css "div.manifestation_total_checkouts", text: /\A\s*.*?: \d+/ end end end
Version data entries
12 entries across 12 versions & 1 rubygems