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

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

FactoryBot.define do
  factory :plan do
    Plan.all_plans.each do |plan|
      factory :"#{plan}_plan" do
        name { plan }
        title { name.titleize }
        initialize_with { Plan.find_or_create_by!(name: plan) }
      end
    end
  end
end