|
|
@ -85,7 +85,7 @@ RSpec.describe ChallengableConcern do
|
|
|
|
before { get :foo }
|
|
|
|
before { get :foo }
|
|
|
|
|
|
|
|
|
|
|
|
it 'renders challenge' do
|
|
|
|
it 'renders challenge' do
|
|
|
|
expect(response).to render_template('auth/challenges/new')
|
|
|
|
expect(response).to render_template('auth/challenges/new', layout: :auth)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
# See Auth::ChallengesControllerSpec
|
|
|
|
# See Auth::ChallengesControllerSpec
|
|
|
@ -95,7 +95,7 @@ RSpec.describe ChallengableConcern do
|
|
|
|
before { post :bar }
|
|
|
|
before { post :bar }
|
|
|
|
|
|
|
|
|
|
|
|
it 'renders challenge' do
|
|
|
|
it 'renders challenge' do
|
|
|
|
expect(response).to render_template('auth/challenges/new')
|
|
|
|
expect(response).to render_template('auth/challenges/new', layout: :auth)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
it 'accepts correct password' do
|
|
|
|
it 'accepts correct password' do
|
|
|
@ -106,7 +106,7 @@ RSpec.describe ChallengableConcern do
|
|
|
|
|
|
|
|
|
|
|
|
it 'rejects wrong password' do
|
|
|
|
it 'rejects wrong password' do
|
|
|
|
post :bar, params: { form_challenge: { current_password: 'dddfff888123' } }
|
|
|
|
post :bar, params: { form_challenge: { current_password: 'dddfff888123' } }
|
|
|
|
expect(response.body).to render_template('auth/challenges/new')
|
|
|
|
expect(response.body).to render_template('auth/challenges/new', layout: :auth)
|
|
|
|
expect(session[:challenge_passed_at]).to be_nil
|
|
|
|
expect(session[:challenge_passed_at]).to be_nil
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|