diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-08-27 18:50:17 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-09-04 10:19:33 -0300 |
commit | b332caa4eb607073d62848c46a3fafbd660d18aa (patch) | |
tree | 76ccb1143cbf08eef4df9e3d82cdffbac6049ad2 /spec/services/audit_event_service_spec.rb | |
parent | ab2d5fdd6ae7686b808167da96ad3fe5ba21abc8 (diff) | |
download | gitlab-ce-b332caa4eb607073d62848c46a3fafbd660d18aa.tar.gz |
Backport "Track repository pushes as audit events"
Diffstat (limited to 'spec/services/audit_event_service_spec.rb')
-rw-r--r-- | spec/services/audit_event_service_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/audit_event_service_spec.rb b/spec/services/audit_event_service_spec.rb index e42bff607b2..96df6689bb0 100644 --- a/spec/services/audit_event_service_spec.rb +++ b/spec/services/audit_event_service_spec.rb @@ -47,4 +47,16 @@ describe AuditEventService do expect(details[:target_id]).to eq(1) end end + + describe '#log_security_event_to_file' do + it 'logs security event to file' do + expect(service).to receive(:file_logger).and_return(logger) + expect(logger).to receive(:info).with(author_id: user.id, + entity_type: 'Project', + entity_id: project.id, + action: :destroy) + + service.log_security_event_to_file + end + end end |