Sha256: d50373f1a9572358d3244a48761ffc853a0c110261da54be842133726d38b02d

Contents?: true

Size: 1.11 KB

Versions: 7

Compression:

Stored size: 1.11 KB

Contents

require 'rails_helper'

RSpec.describe 'Libraries', type: :system do
  include Devise::Test::IntegrationHelpers
  fixtures :all

  describe 'When logged in as Administrator' do
    before do
      sign_in users(:admin)
    end

    xit 'should show library config' do
      visit library_path(libraries(:library_00002).id, locale: :ja)
      expect(page).to have_content '設定'
    end
  end

  describe 'When logged in as Librarian' do
    before do
      sign_in users(:librarian1)
    end

    xit 'should not show library config' do
      visit library_path(libraries(:library_00002).id, locale: :ja)
      expect(page).not_to have_link '設定'
    end
  end

  describe 'When logged in as User' do
    before do
      sign_in users(:user1)
    end

    it 'should not show library config' do
      visit library_path(libraries(:library_00002).id, locale: :ja)
      expect(page).not_to have_link '設定'
    end
  end

  describe 'When not logged in' do
    it 'should not show library config' do
      visit library_path(libraries(:library_00002).id, locale: :ja)
      expect(page).not_to have_link '設定'
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
enju_library-0.3.11 spec/system/libraries_spec.rb
enju_library-0.3.10 spec/system/libraries_spec.rb
enju_library-0.3.9 spec/system/libraries_spec.rb
enju_library-0.3.8 spec/system/libraries_spec.rb
enju_library-0.3.8.rc.2 spec/system/libraries_spec.rb
enju_library-0.3.8.rc.1 spec/system/libraries_spec.rb
enju_library-0.4.0.rc.1 spec/system/libraries_spec.rb