Commit 413e14cb authored by Andrei Gliga's avatar Andrei Gliga
Browse files

stub Devise.omniauth_providers to return GitHub even if the gitlab.yml has no...

stub Devise.omniauth_providers to return GitHub even if the gitlab.yml has no omniauth provider enabled
This will fix failing tests in case gitlab.yml file has no omniauth providers enabled
parent 417ecacaff00
......@@ -20,8 +20,14 @@
it { is_expected.to allow_value(https).for(:after_sign_out_path) }
it { is_expected.not_to allow_value(ftp).for(:after_sign_out_path) }
it { is_expected.to allow_value([:github]).for(:disabled_oauth_sign_in_sources) }
it { is_expected.not_to allow_value([:test]).for(:disabled_oauth_sign_in_sources) }
describe 'disabled_oauth_sign_in_sources validations' do
before do
allow(Devise).to receive(:omniauth_providers).and_return([:github])
end
it { is_expected.to allow_value(['github']).for(:disabled_oauth_sign_in_sources) }
it { is_expected.not_to allow_value(['test']).for(:disabled_oauth_sign_in_sources) }
end
it { is_expected.to validate_presence_of(:max_attachment_size) }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment