mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Do not test PAM authentication by default (#9027)
* Do not test PAM authentication by default * Disable PAM tests if PAM is not enabled
This commit is contained in:
parent
9486f0ca77
commit
d5bfba3262
@ -3,7 +3,3 @@ NODE_ENV=test
|
|||||||
# Federation
|
# Federation
|
||||||
LOCAL_DOMAIN=cb6e6126.ngrok.io
|
LOCAL_DOMAIN=cb6e6126.ngrok.io
|
||||||
LOCAL_HTTPS=true
|
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]
|
request.env['devise.mapping'] = Devise.mappings[:user]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if ENV['PAM_ENABLED'] == 'true'
|
||||||
context 'using PAM authentication' do
|
context 'using PAM authentication' do
|
||||||
context 'using a valid password' do
|
context 'using a valid password' do
|
||||||
before do
|
before do
|
||||||
@ -105,6 +106,7 @@ 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') }
|
||||||
|
Loading…
Reference in New Issue
Block a user