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>2022-06-15 09:08:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-15 09:08:36 +0300
commite75da32ffd5360a31279e28ecd6060e86a6092b3 (patch)
treeba131bc0656682ad81301c919e2f096966749128 /spec/factories
parentca520489ffe196b194843851148a3d0a17064957 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/issues.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/factories/issues.rb b/spec/factories/issues.rb
index 8c714f7736f..88522737e06 100644
--- a/spec/factories/issues.rb
+++ b/spec/factories/issues.rb
@@ -41,6 +41,13 @@ FactoryBot.define do
end
end
+ trait :closed_as_duplicate do
+ closed
+ after(:create) do |issue|
+ issue.update!(duplicated_to: create(:issue, project: issue.project))
+ end
+ end
+
after(:build) do |issue, evaluator|
issue.state_id = Issue.available_states[evaluator.state]
end