diff --git a/spec/lib/gitlab/ldap/user_spec.rb b/spec/lib/gitlab/ldap/user_spec.rb index 71b316bee2..624b95c0f2 100644 --- a/spec/lib/gitlab/ldap/user_spec.rb +++ b/spec/lib/gitlab/ldap/user_spec.rb @@ -31,18 +31,6 @@ describe Gitlab::LDAP::User do gl_auth.find_or_create(@auth) end - it "should update credentials by username if missing uid and Gitlab.config.ldap.allow_username_or_email_login is true" do - user = double('User') - value = Gitlab.config.ldap.allow_username_or_email_login - Gitlab.config.ldap['allow_username_or_email_login'] = true - User.stub find_by_extern_uid_and_provider: nil - User.stub(:find_by).with(hash_including(email: anything())) { nil } - User.stub(:find_by).with(hash_including(username: anything())) { user } - user.should_receive :update_attributes - gl_auth.find_or_create(@auth) - Gitlab.config.ldap['allow_username_or_email_login'] = value - end - it "should not update credentials by username if missing uid and Gitlab.config.ldap.allow_username_or_email_login is false" do user = double('User') value = Gitlab.config.ldap.allow_username_or_email_login @@ -55,4 +43,4 @@ describe Gitlab::LDAP::User do Gitlab.config.ldap['allow_username_or_email_login'] = value end end -end +end \ No newline at end of file diff --git a/spec/lib/gitlab/oauth/user_spec.rb b/spec/lib/gitlab/oauth/user_spec.rb index 2f15b5e034..5b07615755 100644 --- a/spec/lib/gitlab/oauth/user_spec.rb +++ b/spec/lib/gitlab/oauth/user_spec.rb @@ -42,4 +42,4 @@ describe Gitlab::OAuth::User do user.can_create_group.should == Gitlab.config.gitlab.default_can_create_group end end -end +end \ No newline at end of file