Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 18:11:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 18:11:17 +0300
commitdad48b4af20204db430a6c62c4641283e24dd89a (patch)
treec8b4644cf30e2babe572f20b89257bcd8fa4b6d6 /spec/factories/events.rb
parente2999d09ec050b12b6de9121d9aedc38c12477fd (diff)
Add latest changes from gitlab-org/gitlab@master
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 }