diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-06 15:06:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-06 15:06:46 +0300 |
commit | 30acb0522a609c438d60f5345243e96f9a041ae6 (patch) | |
tree | ce1b11d55c510996e3ebe9a5e96db5fd08dbeaf2 /spec/factories | |
parent | d2485dbfedc4759eba5243e0d155e34494c4429b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/audit_events.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/factories/audit_events.rb b/spec/factories/audit_events.rb index 10f60591922..ceb7516441f 100644 --- a/spec/factories/audit_events.rb +++ b/spec/factories/audit_events.rb @@ -88,6 +88,29 @@ FactoryBot.define do end end + trait :instance_event do + transient { instance_scope { Gitlab::Audit::InstanceScope.new } } + + entity_type { Gitlab::Audit::InstanceScope.name } + entity_id { instance_scope.id } + entity_path { instance_scope.full_path } + target_details { instance_scope.name } + ip_address { IPAddr.new '127.0.0.1' } + details do + { + change: 'project_creation_level', + from: nil, + to: 'Developers + Maintainers', + author_name: user.name, + target_id: instance_scope.id, + target_type: Gitlab::Audit::InstanceScope.name, + target_details: instance_scope.name, + ip_address: '127.0.0.1', + entity_path: instance_scope.full_path + } + end + end + factory :project_audit_event, traits: [:project_event] factory :group_audit_event, traits: [:group_event] end |