refactor(routing): toggle routing when simple routing
This commit is contained in:
parent
f03d10e246
commit
520050933e
2 changed files with 2 additions and 1 deletions
|
@ -48,7 +48,7 @@ module Administrateurs
|
|||
gi.update(routing_rule: ds_eq(champ_value(stable_id), constant(gi.label)))
|
||||
end
|
||||
|
||||
defaut = @procedure.defaut_groupe_instructeur
|
||||
defaut = @procedure.defaut_groupe_instructeur.tap(&:toggle_routing)
|
||||
|
||||
if !tdc_options.include?(defaut.label)
|
||||
new_defaut = @procedure.reload.groupe_instructeurs_but_defaut.first
|
||||
|
|
|
@ -723,6 +723,7 @@ describe Administrateurs::GroupeInstructeursController, type: :controller do
|
|||
expect(flash.notice).to eq 'Les groupes instructeurs ont été ajoutés'
|
||||
expect(procedure3.groupe_instructeurs.pluck(:label)).to match_array(['Paris', 'Lyon', 'Marseille'])
|
||||
expect(procedure3.reload.defaut_groupe_instructeur.routing_rule).to eq(ds_eq(champ_value(drop_down_tdc.stable_id), constant('Lyon')))
|
||||
expect(procedure3.routing_enabled).to be_truthy
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue