diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-02-18 17:01:07 -0500 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-02-18 17:01:07 -0500 |
commit | 06376be56a84b43976b63aad91638fb2c00fec1a (patch) | |
tree | 049b4900ff1700a257a0da502f3c201c5e871bd1 /spec/lib/gitlab/o_auth/user_spec.rb | |
parent | ea4d2741a2b574407b0bd387ccd6a8202c014fc5 (diff) | |
download | gitlab-ce-06376be56a84b43976b63aad91638fb2c00fec1a.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 |