Sha256: e002dc1f405c0e6f3cf06d88b54ed9d30795c81f1217277184d7ed5eabf5f514
Contents?: true
Size: 781 Bytes
Versions: 38
Compression:
Stored size: 781 Bytes
Contents
describe 'login' do let(:regular_user) { FactoryBot.create(:user, password: 'heslo123', password_confirmation: 'heslo123')} it 'login form' do get symphonia.login_path expect(response).to have_http_status(:success) end it 'login process' do expect(Symphonia::User.current).to be_a Symphonia::User::Anonymous post symphonia.user_sessions_path, params: { login_session: { login: regular_user.login, password: 'heslo123' }} expect(response).to have_http_status :redirect expect(Symphonia::User.current.id).to eq regular_user.id end context 'logged', logged: true do it '#logout' do expect(Symphonia::User.current).to be_a Symphonia::User delete symphonia.logout_path expect(response).to redirect_to '/' end end end
Version data entries
38 entries across 38 versions & 1 rubygems