Sha256: b5c4d5772938f8eccbfce61eab9ead57611ba00bfec063622871eaa61358755c

Contents?: true

Size: 745 Bytes

Versions: 2

Compression:

Stored size: 745 Bytes

Contents

require 'rails_helper'

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

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

    it 'should show index' do
      visit root_path(locale: :ja)
      expect(page).to have_content 'ようこそ'
    end
  end

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

    it 'should show index' do
      visit root_path(locale: :ja)
      expect(page).to have_content 'ようこそ'
    end
  end

  describe 'When not logged in' do
    it 'should show index' do
      visit root_path(locale: :ja)
      expect(page).to have_content '資料の検索'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
enju_leaf-2.0.0.beta.2 spec/system/page_spec.rb
enju_leaf-2.0.0.beta.1 spec/system/page_spec.rb