Procedure: remove direct instructeurs access
Add shortcut for the spec to assign instructeurs directly to the defaut groupe
This commit is contained in:
parent
b541ef0b41
commit
31cb056351
2 changed files with 5 additions and 2 deletions
|
@ -14,6 +14,7 @@ FactoryBot.define do
|
|||
|
||||
transient do
|
||||
administrateur {}
|
||||
instructeurs { [] }
|
||||
end
|
||||
|
||||
after(:build) do |procedure, evaluator|
|
||||
|
@ -24,6 +25,10 @@ FactoryBot.define do
|
|||
end
|
||||
end
|
||||
|
||||
after(:create) do |procedure, evaluator|
|
||||
evaluator.instructeurs.each { |i| i.assign_to_procedure(procedure) }
|
||||
end
|
||||
|
||||
factory :procedure_with_dossiers do
|
||||
transient do
|
||||
dossiers_count { 1 }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue