diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-03 18:10:03 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-03 18:10:03 +0000 |
commit | b6847c621ff246e6abceb90545d5a608318762d6 (patch) | |
tree | 460da2a6c2be2e4f5164c2bba1851b66260f850d /spec/factories/internal_ids.rb | |
parent | c08d9c22569d1c9e7c7737e183969593394133d9 (diff) | |
download | gitlab-ce-b6847c621ff246e6abceb90545d5a608318762d6.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories/internal_ids.rb')
-rw-r--r-- | spec/factories/internal_ids.rb | 6 |
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 |