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>2020-04-03 21:10:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-03 21:10:03 +0300
commitb6847c621ff246e6abceb90545d5a608318762d6 (patch)
tree460da2a6c2be2e4f5164c2bba1851b66260f850d /spec/factories/internal_ids.rb
parentc08d9c22569d1c9e7c7737e183969593394133d9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories/internal_ids.rb')
-rw-r--r--spec/factories/internal_ids.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/factories/internal_ids.rb b/spec/factories/internal_ids.rb
index bc6ea41ec06..02baaedb996 100644
--- a/spec/factories/internal_ids.rb
+++ b/spec/factories/internal_ids.rb
@@ -6,4 +6,10 @@ FactoryBot.define do
usage { :issues }
last_value { project.issues.maximum(:iid) || 0 }
end
+
+ trait :has_internal_id do
+ after(:stub) do |record|
+ record.iid ||= generate(:iid)
+ end
+ end
end