Link assign_to and procedure by groupe_instructeur
This commit is contained in:
parent
4da12ed3e8
commit
ad7ef6c739
4 changed files with 4 additions and 4 deletions
|
@ -347,7 +347,7 @@ describe Instructeurs::ProceduresController, type: :controller do
|
|||
it { expect(instructeur.groupe_instructeur_with_email_notifications).to be_empty }
|
||||
|
||||
context 'when the instructeur update its preferences' do
|
||||
let(:assign_to) { instructeur.assign_to.find_by(procedure: procedure) }
|
||||
let(:assign_to) { instructeur.assign_to.joins(:groupe_instructeur).find_by(groupe_instructeurs: { procedure: procedure }) }
|
||||
|
||||
before do
|
||||
patch :update_email_notifications, params: { procedure_id: procedure.id, assign_to: { id: assign_to.id, email_notifications_enabled: true } }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue