diff options
author | Andreas Brandl <abrandl@gitlab.com> | 2018-03-12 17:38:56 +0300 |
---|---|---|
committer | Andreas Brandl <abrandl@gitlab.com> | 2018-03-16 15:35:25 +0300 |
commit | 0360b0928aada1db7635e6c6bc40f0f571b72c30 (patch) | |
tree | 8753b119a642505f450304684d36c33a8d8ddc79 /spec/factories/internal_ids.rb | |
parent | 754272e392c0da088200a1b56156600973f63267 (diff) |
More flexible way of internal id generation.
Diffstat (limited to 'spec/factories/internal_ids.rb')
-rw-r--r-- | spec/factories/internal_ids.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/factories/internal_ids.rb b/spec/factories/internal_ids.rb index b4c14d22a29..fbde07a391a 100644 --- a/spec/factories/internal_ids.rb +++ b/spec/factories/internal_ids.rb @@ -1,6 +1,7 @@ FactoryBot.define do factory :internal_id do project - usage { InternalId.usages.keys.first } + usage :issues + last_value { project.issues.maximum(:iid) || 0 } end end |