Sha256: 3984cf54cd734b17307c00c57bcff6ddb3b11c7bcbab44e7f9a423f3720e654d

Contents?: true

Size: 798 Bytes

Versions: 8

Compression:

Stored size: 798 Bytes

Contents

require 'rails_helper'
require 'ecm/user_area/spec_helper'

feature 'User Area -> Authentication' do
  include Ecm::UserArea::SpecHelper

  background do
    I18n.locale = :de
  end

  describe 'sign in' do
    context 'with an existant user' do
      background do
        @user = Ecm::UserArea::CreateDefaultUserService.call.user
      end

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

  describe 'sign out' do
    background do
      user = Ecm::UserArea::CreateDefaultUserService.call.user
      sign_in(user)
    end

    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

8 entries across 8 versions & 1 rubygems

Version Path
ecm_user_area2-2.3.0 spec/features/authentication_feature_spec.rb
ecm_user_area2-2.2.0 spec/features/authentication_feature_spec.rb
ecm_user_area2-2.0.0 spec/features/authentication_feature_spec.rb
ecm_user_area2-1.2.10 spec/features/authentication_feature_spec.rb
ecm_user_area2-1.2.9 spec/features/authentication_feature_spec.rb
ecm_user_area2-1.2.8 spec/features/authentication_feature_spec.rb
ecm_user_area2-1.2.6 spec/features/authentication_feature_spec.rb
ecm_user_area2-1.0.3 spec/features/authentication_feature_spec.rb