summaryrefslogtreecommitdiff
path: root/spec/factories/events.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-04-20 23:50:22 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-20 23:50:22 +0000
commit9dc93a4519d9d5d7be48ff274127136236a3adb3 (patch)
tree70467ae3692a0e35e5ea56bcb803eb512a10bedb /spec/factories/events.rb
parent4b0f34b6d759d6299322b3a54453e930c6121ff0 (diff)
downloadgitlab-ce-9dc93a4519d9d5d7be48ff274127136236a3adb3.tar.gz
Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43
Diffstat (limited to 'spec/factories/events.rb')
-rw-r--r--spec/factories/events.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/spec/factories/events.rb b/spec/factories/events.rb
index 6c9f1ba0137..c9e4ada3ffa 100644
--- a/spec/factories/events.rb
+++ b/spec/factories/events.rb
@@ -27,17 +27,20 @@ FactoryBot.define do
factory :wiki_page_event do
action { :created }
+ # rubocop: disable FactoryBot/InlineAssociation
+ # A persistent project is needed to have a wiki page being created properly.
project { @overrides[:wiki_page]&.container || create(:project, :wiki_repo) }
- target { create(:wiki_page_meta, :for_wiki_page, wiki_page: wiki_page) }
+ # rubocop: enable FactoryBot/InlineAssociation
+ target { association(:wiki_page_meta, :for_wiki_page, wiki_page: wiki_page) }
transient do
- wiki_page { create(:wiki_page, container: project) }
+ wiki_page { association(:wiki_page, container: project) }
end
end
trait :has_design do
transient do
- design { create(:design, issue: create(:issue, project: project)) }
+ design { association(:design, issue: association(:issue, project: project)) }
end
end
@@ -45,7 +48,7 @@ FactoryBot.define do
has_design
transient do
- note { create(:note, author: author, project: project, noteable: design) }
+ note { association(:note, author: author, project: project, noteable: design) }
end
action { :commented }