diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 10:34:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 10:34:06 +0000 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /spec/factories/audit_events.rb | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) | |
download | gitlab-ce-859a6fb938bb9ee2a317c46dfa4fcc1af49608f0.tar.gz |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'spec/factories/audit_events.rb')
-rw-r--r-- | spec/factories/audit_events.rb | 15 |
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) } } |