diff options
author | Robert Speicher <rspeicher@gmail.com> | 2012-09-12 18:11:59 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2012-09-12 18:11:59 -0400 |
commit | 0d77209ea0f13184a8140efeaafa52bc916ec71f (patch) | |
tree | ed0bb189f402a2603edfdaac6f95b5c6c1e1a606 /spec/lib | |
parent | 3643df1f7cbcc3734055b0d710fd21dd4426ca3b (diff) | |
download | gitlab-ce-0d77209ea0f13184a8140efeaafa52bc916ec71f.tar.gz |
Be more resilient in the case of missing omniauth settings
Should no longer freak out when omniauth settings aren't present in
gitlab.yml. People who aren't using it shouldn't even have to put a
'false' entry in their config for it (and probably wouldn't, after an
upgrade).
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/auth_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/lib/auth_spec.rb b/spec/lib/auth_spec.rb index 5faf1307ed2..1e03bc591b4 100644 --- a/spec/lib/auth_spec.rb +++ b/spec/lib/auth_spec.rb @@ -4,6 +4,8 @@ describe Gitlab::Auth do let(:gl_auth) { Gitlab::Auth.new } before do + Gitlab.config.stub(omniauth: {}) + @info = mock( uid: '12djsak321', name: 'John', @@ -64,7 +66,7 @@ describe Gitlab::Auth do end it "should create user if single_sing_on"do - Gitlab.config.omniauth.stub allow_single_sign_on: true + Gitlab.config.omniauth['allow_single_sign_on'] = true User.stub find_by_provider_and_extern_uid: nil gl_auth.should_receive :create_from_omniauth gl_auth.find_or_new_for_omniauth(@auth) |