feat(groupe instructeur): can enable routing from import
This commit is contained in:
parent
9f0f5b0dc5
commit
e1906febcc
2 changed files with 2 additions and 1 deletions
|
@ -15,7 +15,7 @@ class InstructeursImportService
|
||||||
|
|
||||||
if missing_labels.present?
|
if missing_labels.present?
|
||||||
created_at = Time.zone.now
|
created_at = Time.zone.now
|
||||||
GroupeInstructeur.insert_all(missing_labels.map { |label| { procedure_id: procedure.id, label:, created_at:, updated_at: created_at } })
|
GroupeInstructeur.create!(missing_labels.map { |label| { procedure_id: procedure.id, label:, created_at:, updated_at: created_at } })
|
||||||
end
|
end
|
||||||
|
|
||||||
emails_in_groupe = groupes_emails
|
emails_in_groupe = groupes_emails
|
||||||
|
|
|
@ -521,6 +521,7 @@ describe Administrateurs::GroupeInstructeursController, type: :controller do
|
||||||
it { expect(response.status).to eq(302) }
|
it { expect(response.status).to eq(302) }
|
||||||
it { expect(flash.alert).to be_present }
|
it { expect(flash.alert).to be_present }
|
||||||
it { expect(flash.alert).to eq("Import terminé. Cependant les emails suivants ne sont pas pris en compte: kara") }
|
it { expect(flash.alert).to eq("Import terminé. Cependant les emails suivants ne sont pas pris en compte: kara") }
|
||||||
|
it { expect(procedure_non_routee.reload.routing_enabled?).to be_truthy }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when the file content type is application/vnd.ms-excel' do
|
context 'when the file content type is application/vnd.ms-excel' do
|
||||||
|
|
Loading…
Reference in a new issue