summaryrefslogtreecommitdiff
path: root/spec/factories/events.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-20 14:34:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-20 14:34:42 +0000
commit9f46488805e86b1bc341ea1620b866016c2ce5ed (patch)
treef9748c7e287041e37d6da49e0a29c9511dc34768 /spec/factories/events.rb
parentdfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff)
downloadgitlab-ce-9f46488805e86b1bc341ea1620b866016c2ce5ed.tar.gz
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'spec/factories/events.rb')
-rw-r--r--spec/factories/events.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/factories/events.rb b/spec/factories/events.rb
index 5b456bb58ff..ed6cb3505f4 100644
--- a/spec/factories/events.rb
+++ b/spec/factories/events.rb
@@ -25,13 +25,23 @@ FactoryBot.define do
factory :wiki_page_event do
action { Event::CREATED }
- project { @overrides[:wiki_page]&.project || create(:project, :wiki_repo) }
+ project { @overrides[:wiki_page]&.container || create(:project, :wiki_repo) }
target { create(:wiki_page_meta, :for_wiki_page, wiki_page: wiki_page) }
transient do
- wiki_page { create(:wiki_page, project: project) }
+ wiki_page { create(:wiki_page, container: project) }
end
end
+
+ trait :for_design do
+ transient do
+ design { create(:design, issue: create(:issue, project: project)) }
+ note { create(:note, author: author, project: project, noteable: design) }
+ end
+
+ action { Event::COMMENTED }
+ target { note }
+ end
end
factory :push_event, class: 'PushEvent' do