gitlab-org--gitlab-foss/spec/factories/plans.rb

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

14 lines
284 B
Ruby
Raw Normal View History

# 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