demarches-normaliennes/spec/factories/champ.rb

22 lines
577 B
Ruby
Raw Normal View History

2018-01-23 17:15:42 +01:00
FactoryBot.define do
factory :champ do
2018-01-23 17:15:42 +01:00
type_de_champ { FactoryBot.create(:type_de_champ_public) }
2017-07-11 16:50:29 +02:00
trait :checkbox do
2018-01-23 17:15:42 +01:00
type_de_champ { FactoryBot.create(:type_de_champ_public, :checkbox) }
2017-07-11 16:50:29 +02:00
end
trait :header_section do
2018-01-23 17:15:42 +01:00
type_de_champ { FactoryBot.create(:type_de_champ_public, :header_section) }
2017-07-11 16:50:29 +02:00
end
trait :explication do
2018-01-23 17:15:42 +01:00
type_de_champ { FactoryBot.create(:type_de_champ_public, :explication) }
end
trait :dossier_link do
2018-01-23 17:15:42 +01:00
type_de_champ { FactoryBot.create(:type_de_champ_public, :type_dossier_link) }
end
end
end