Do not test PAM authentication by default (#9027)
* Do not test PAM authentication by default * Disable PAM tests if PAM is not enabledpull/792/head
parent
9486f0ca77
commit
d5bfba3262
|
@ -3,7 +3,3 @@ NODE_ENV=test
|
|||
# Federation
|
||||
LOCAL_DOMAIN=cb6e6126.ngrok.io
|
||||
LOCAL_HTTPS=true
|
||||
# test pam authentication
|
||||
PAM_ENABLED=true
|
||||
PAM_DEFAULT_SERVICE=pam_test
|
||||
PAM_CONTROLLED_SERVICE=pam_test_controlled
|
||||
|
|
|
@ -55,6 +55,7 @@ RSpec.describe Auth::SessionsController, type: :controller do
|
|||
request.env['devise.mapping'] = Devise.mappings[:user]
|
||||
end
|
||||
|
||||
if ENV['PAM_ENABLED'] == 'true'
|
||||
context 'using PAM authentication' do
|
||||
context 'using a valid password' do
|
||||
before do
|
||||
|
@ -105,6 +106,7 @@ RSpec.describe Auth::SessionsController, type: :controller do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'using password authentication' do
|
||||
let(:user) { Fabricate(:user, email: 'foo@bar.com', password: 'abcdefgh') }
|
||||
|
|
Loading…
Reference in New Issue