Sha256: 8d11462b9519cfeb6f103adc56985625c257600c6b4763d2ff4b9bc067e63811

Contents?: true

Size: 840 Bytes

Versions: 48

Compression:

Stored size: 840 Bytes

Contents

require 'rails_helper'
require 'cmor/user_area/spec_helpers/feature'

RSpec.describe 'User Area -> Authentication', type: :feature do
  include Cmor::UserArea::SpecHelpers::Feature

  before(:each) { I18n.locale = :de }

  describe 'sign in' do
    context 'with an existant user' do
      let(:user) { Cmor::UserArea::CreateDefaultUserService.call.user }

      before(:each) { user }

      it 'should sign in' do
        sign_in(user)
        expect(page.body).to include(I18n.t('messages.success.cmor_user_area.signed_in'))
      end
    end
  end

  describe 'sign out' do
    let(:user) { Cmor::UserArea::CreateDefaultUserService.call.user }

    before(:each) { sign_in(user) }

    it 'should redirect to the home page' do
      click_link('Ausloggen')
      page.current_path.should eq('/de')
    end
  end # describe 'logout'
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
cmor_user_area-0.0.51.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.50.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.49.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.48.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.45.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.44.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.43.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.42.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.41.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.40.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.39.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.38.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.37.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.36.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.35.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.34.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.33.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.32.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.31.pre spec/features/authentication_feature_spec.rb
cmor_user_area-0.0.30.pre spec/features/authentication_feature_spec.rb