mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-13 22:59:19 +10:00
In between patches fixup
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user