2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-05-09 12:01:36 +05:30
|
|
|
FactoryBot.define do
|
|
|
|
factory :internal_id do
|
|
|
|
project
|
2019-12-21 20:55:43 +05:30
|
|
|
usage { :issues }
|
2018-05-09 12:01:36 +05:30
|
|
|
last_value { project.issues.maximum(:iid) || 0 }
|
|
|
|
end
|
2020-04-22 19:07:51 +05:30
|
|
|
|
|
|
|
trait :has_internal_id do
|
|
|
|
after(:stub) do |record|
|
|
|
|
record.iid ||= generate(:iid)
|
|
|
|
end
|
|
|
|
end
|
2018-05-09 12:01:36 +05:30
|
|
|
end
|