debian-mirror-gitlab/spec/factories/internal_ids.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
283 B
Ruby
Raw Normal View History

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