2019-07-25 01:11:48 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-06 14:09:01 -05:00
|
|
|
FactoryBot.define do
|
|
|
|
factory :internal_id do
|
|
|
|
project
|
2019-10-01 20:06:26 -04:00
|
|
|
usage { :issues }
|
2018-03-12 10:38:56 -04:00
|
|
|
last_value { project.issues.maximum(:iid) || 0 }
|
2018-03-06 14:09:01 -05:00
|
|
|
end
|
2020-04-03 14:10:03 -04:00
|
|
|
|
|
|
|
trait :has_internal_id do
|
|
|
|
after(:stub) do |record|
|
|
|
|
record.iid ||= generate(:iid)
|
|
|
|
end
|
|
|
|
end
|
2018-03-06 14:09:01 -05:00
|
|
|
end
|