Commit 3f54ae10 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Resolve conflicts concerning `Gitlab::LDAP::Access`

parent 4dcd2d56
......@@ -19,12 +19,8 @@ module Gitlab
# Whether user is allowed, or not, we should update
# permissions to keep things clean
if access.allowed?
<<<<<<< HEAD
access.update_user
Users::UpdateService.new(user, last_credential_check_a: Time.now).execute
=======
Users::UpdateService.new(user, last_credential_check_at: Time.now).execute
>>>>>>> upstream/master
true
else
......
......@@ -5,7 +5,17 @@ describe Gitlab::LDAP::Access, lib: true do
let(:access) { Gitlab::LDAP::Access.new user }
let(:user) { create(:omniauth_user) }
<<<<<<< HEAD
describe '.allowed?' do
it 'updates the users `last_credential_check_at' do
allow(access).to receive(:update_user)
expect(access).to receive(:allowed?) { true }
expect(described_class).to receive(:open).and_yield(access)
expect { described_class.allowed?(user) }
.to change { user.last_credential_check_at }
end
end
describe '#find_ldap_user' do
it 'finds a user by dn first' do
expect(Gitlab::LDAP::Person).to receive(:find_by_dn).and_return(:ldap_user)
......@@ -20,15 +30,6 @@ describe Gitlab::LDAP::Access, lib: true do
expect(Gitlab::LDAP::Person).to receive(:find_by_email)
access.find_ldap_user
=======
describe '.allowed?' do
it 'updates the users `last_credential_check_at' do
expect(access).to receive(:allowed?) { true }
expect(described_class).to receive(:open).and_yield(access)
expect { described_class.allowed?(user) }
.to change { user.last_credential_check_at }
>>>>>>> upstream/master
end
end
......
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