|
|
@ -55,8 +55,7 @@ RSpec.describe Auth::SessionsController, type: :controller do |
|
|
|
request.env['devise.mapping'] = Devise.mappings[:user] |
|
|
|
request.env['devise.mapping'] = Devise.mappings[:user] |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
if ENV['PAM_ENABLED'] == 'true' |
|
|
|
context 'using PAM authentication', if: ENV['PAM_ENABLED'] == 'true' do |
|
|
|
context 'using PAM authentication' do |
|
|
|
|
|
|
|
context 'using a valid password' do |
|
|
|
context 'using a valid password' do |
|
|
|
before do |
|
|
|
before do |
|
|
|
post :create, params: { user: { email: "pam_user1", password: '123456' } } |
|
|
|
post :create, params: { user: { email: "pam_user1", password: '123456' } } |
|
|
@ -106,7 +105,6 @@ RSpec.describe Auth::SessionsController, type: :controller do |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
context 'using password authentication' do |
|
|
|
context 'using password authentication' do |
|
|
|
let(:user) { Fabricate(:user, email: 'foo@bar.com', password: 'abcdefgh') } |
|
|
|
let(:user) { Fabricate(:user, email: 'foo@bar.com', password: 'abcdefgh') } |
|
|
|