Sha256: 81e2a8ec73c9d7629ef8b60d34fe95ea3045e8f493f2fbcd6c75c632500d01d4
Contents?: true
Size: 882 Bytes
Versions: 4
Compression:
Stored size: 882 Bytes
Contents
require 'rails_helper' RSpec.describe 'Checkouts', type: :system do include Devise::Test::IntegrationHelpers fixtures :all before(:each) do @item = FactoryBot.create(:item) @item.use_restriction = UseRestriction.find_by(name: 'Not For Loan') @item.save CarrierType.find_by(name: 'volume').update(attachment: File.open("#{Rails.root.to_s}/../dummy/app/assets/images/icons/book.png")) end describe 'When logged in as Librarian' do it 'should contain use_restriction' do sign_in users(:librarian1) visit manifestation_path(@item.manifestation) expect(page).to have_content '貸出不可' end end describe 'When not logged in' do it 'should contain use_restriction' do sign_in users(:librarian1) visit manifestation_path(@item.manifestation) expect(page).to have_content '貸出不可' end end end
Version data entries
4 entries across 4 versions & 1 rubygems