Activate champ integer number on all the new procedures

This commit is contained in:
Paul Chavard 2020-02-20 13:25:32 +01:00
parent d879a43520
commit be66a8986c
4 changed files with 85 additions and 54 deletions

View file

@ -162,6 +162,14 @@ FactoryBot.define do
end
end
trait :with_number do
after(:build) do |procedure, _evaluator|
type_de_champ = create(:type_de_champ_number)
procedure.types_de_champ << type_de_champ
end
end
trait :published do
after(:build) do |procedure, _evaluator|
procedure.path = generate(:published_path)