diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-01 12:08:28 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-01 12:08:28 +0000 |
commit | 65f197cdb6f7732e6c56433483a17f50d98b48f0 (patch) | |
tree | 2e016797b8383a126a8d341f5897743af406bd57 /spec/factories | |
parent | c6e6762bbf9fa3e38f37a886237c6e920f6c409c (diff) | |
download | gitlab-ce-65f197cdb6f7732e6c56433483a17f50d98b48f0.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/events.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/factories/events.rb b/spec/factories/events.rb index 021d2070b87..60bb3044191 100644 --- a/spec/factories/events.rb +++ b/spec/factories/events.rb @@ -17,6 +17,7 @@ FactoryBot.define do trait(:left) { action { :left } } trait(:destroyed) { action { :destroyed } } trait(:expired) { action { :expired } } + trait(:archived) { action { :archived } } factory :closed_issue_event do action { :closed } @@ -33,15 +34,27 @@ FactoryBot.define do end end - trait :for_design do + trait :has_design do transient do design { create(:design, issue: create(:issue, project: project)) } + end + end + + trait :for_design do + has_design + + transient do note { create(:note, author: author, project: project, noteable: design) } end action { :commented } target { note } end + + factory :design_event, traits: [:has_design] do + action { :created } + target { design } + end end factory :push_event, class: 'PushEvent' do |