Welcome to mirror list, hosted at ThFree Co, Russian Federation.

internal_ids.rb « factories « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 02baaedb996df1744feddb8bf3e46851505e5c09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

FactoryBot.define do
  factory :internal_id do
    project
    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