summaryrefslogtreecommitdiff
path: root/spec/factories/audit_events.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/audit_events.rb')
-rw-r--r--spec/factories/audit_events.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/factories/audit_events.rb b/spec/factories/audit_events.rb
index 4e72976a9e5..05b86d2f13b 100644
--- a/spec/factories/audit_events.rb
+++ b/spec/factories/audit_events.rb
@@ -49,6 +49,21 @@ FactoryBot.define do
end
end
+ trait :unauthenticated do
+ author_id { -1 }
+ details do
+ {
+ custom_message: 'Custom action',
+ author_name: 'An unauthenticated user',
+ target_id: target_project.id,
+ target_type: 'Project',
+ target_details: target_project.name,
+ ip_address: '127.0.0.1',
+ entity_path: target_project.full_path
+ }
+ end
+ end
+
trait :group_event do
transient { target_group { association(:group) } }