Sha256: 3269213fa45255a6a16f843fdfacc9cc7bb24f674b5976d7b8cb7507ee5fef0a
Contents?: true
Size: 1.13 KB
Versions: 5
Compression:
Stored size: 1.13 KB
Contents
require 'rails_helper' RSpec.describe 'Manifestations', type: :system do include Devise::Test::IntegrationHelpers fixtures :all before do @item = FactoryBot.create(:item, shelf: shelves(:shelf_00002)) CarrierType.find_by(name: 'volume').update(attachment: File.open("#{Rails.root.to_s}/../../app/assets/images/icons/book.png")) FactoryBot.create(:withdraw, item: @item) end describe 'When logged in as Librarian' do before do sign_in users(:librarian1) end it 'should show default item' do visit manifestation_path(@item.manifestation.id, locale: :ja) expect(page).to have_content @item.item_identifier end end describe 'When logged in as User' do before do sign_in users(:user1) end it 'should show default item' do visit manifestation_path(@item.manifestation.id, locale: :ja) expect(page).to have_content @item.item_identifier end end describe 'When not logged in' do it 'should show default item' do visit manifestation_path(@item.manifestation.id, locale: :ja) expect(page).to have_content @item.item_identifier end end end
Version data entries
5 entries across 5 versions & 1 rubygems