diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-02-17 13:13:15 -0500 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-02-18 13:22:19 -0500 |
commit | f014127e173b718b81879634c1dac9191184995c (patch) | |
tree | c391d1539973e95cf37af32686dd7fe6573bad24 /spec/lib/gitlab/o_auth/user_spec.rb | |
parent | 7f7eef2aef31f9cd4297d25d4416515182aa9482 (diff) | |
download | gitlab-ce-f014127e173b718b81879634c1dac9191184995c.tar.gz |
Decouple SAML authentication from the default Omniauth logic
Diffstat (limited to 'spec/lib/gitlab/o_auth/user_spec.rb')
-rw-r--r-- | spec/lib/gitlab/o_auth/user_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/lib/gitlab/o_auth/user_spec.rb b/spec/lib/gitlab/o_auth/user_spec.rb index 925bc442a90..76b1360f208 100644 --- a/spec/lib/gitlab/o_auth/user_spec.rb +++ b/spec/lib/gitlab/o_auth/user_spec.rb @@ -42,7 +42,7 @@ describe Gitlab::OAuth::User, lib: true do describe 'signup' do shared_examples "to verify compliance with allow_single_sign_on" do context "with allow_single_sign_on enabled" do - before { stub_omniauth_config(allow_single_sign_on: true) } + before { stub_omniauth_config(allow_single_sign_on: ['twitter']) } it "creates a user from Omniauth" do oauth_user.save @@ -55,7 +55,7 @@ describe Gitlab::OAuth::User, lib: true do end context "with allow_single_sign_on disabled (Default)" do - before { stub_omniauth_config(allow_single_sign_on: false) } + before { stub_omniauth_config(allow_single_sign_on: []) } it "throws an error" do expect{ oauth_user.save }.to raise_error StandardError end @@ -135,7 +135,7 @@ describe Gitlab::OAuth::User, lib: true do describe 'blocking' do let(:provider) { 'twitter' } - before { stub_omniauth_config(allow_single_sign_on: true) } + before { stub_omniauth_config(allow_single_sign_on: ['twitter']) } context 'signup with omniauth only' do context 'dont block on create' do |