In between patches fixup

parent 9d3eb091
...@@ -31,18 +31,6 @@ describe Gitlab::LDAP::User do ...@@ -31,18 +31,6 @@ describe Gitlab::LDAP::User do
gl_auth.find_or_create(@auth) gl_auth.find_or_create(@auth)
end 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 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') user = double('User')
value = Gitlab.config.ldap.allow_username_or_email_login value = Gitlab.config.ldap.allow_username_or_email_login
......
Markdown is supported
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