fix(procedure): do not route cloned procedures from different admin

This commit is contained in:
Eric Leroy-Terquem 2023-09-21 15:24:17 +02:00
parent 6abd0f8db0
commit 70cc8dac4c
2 changed files with 5 additions and 0 deletions

View file

@ -495,6 +495,7 @@ class Procedure < ApplicationRecord
procedure.encrypted_api_particulier_token = nil
procedure.opendata = true
procedure.api_particulier_scopes = []
procedure.routing_enabled = false
else
procedure.administrateurs = administrateurs
end

View file

@ -747,6 +747,10 @@ describe Procedure do
expect(subject.api_particulier_scopes).to be_empty
end
it 'should not route the procedure' do
expect(subject.routing_enabled).to eq(false)
end
it 'should have a default groupe instructeur' do
expect(subject.groupe_instructeurs.size).to eq(1)
expect(subject.groupe_instructeurs.first.label).to eq(GroupeInstructeur::DEFAUT_LABEL)