Commit 12fc5458 authored by James Lopez's avatar James Lopez

fix specs, fix small bug in details

parent f9f32231
......@@ -97,7 +97,6 @@ module EE
def unauth_security_event
return unless audit_events_enabled?
@details.delete(:ip_address) unless admin_audit_log_enabled?
@details[:entity_path] = @entity&.full_path
......
......@@ -31,7 +31,7 @@ module Audit
"Removed #{value}"
when :failed_login
"Failed to login with #{Gitlab::OAuth::Provider.label_for(value).upcase} authentication"
when :custom
when :custom_message
value
else
text_for_change(value)
......
......@@ -489,14 +489,6 @@ describe API::Users do
expect(user.reload.organization).to eq('GitLab')
end
it 'updates user with a new email' do
put api("/users/#{user.id}", admin), email: 'new@email.com'
expect(response).to have_http_status(200)
expect(user.reload.notification_email).to eq('new@email.com')
expect(AuditEvent.count).to eq(1)
end
it 'updates user with avatar' do
put api("/users/#{user.id}", admin), { avatar: fixture_file_upload(Rails.root + 'spec/fixtures/banana_sample.gif', 'image/gif') }
......
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