BackofficeDossierController: follow dossier when receive
This commit is contained in:
parent
b80d6a6a59
commit
86ea47bb0d
2 changed files with 6 additions and 0 deletions
|
@ -98,6 +98,7 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
|
|||
dossier = Dossier.find(params[:dossier_id])
|
||||
|
||||
dossier.received!
|
||||
current_gestionnaire.follow(dossier)
|
||||
flash.notice = 'Dossier considéré comme reçu.'
|
||||
|
||||
redirect_to backoffice_dossier_path(id: dossier.id)
|
||||
|
|
|
@ -248,6 +248,11 @@ describe Backoffice::DossiersController, type: :controller do
|
|||
end
|
||||
|
||||
it { is_expected.to redirect_to backoffice_dossier_path(id: dossier.id) }
|
||||
|
||||
it do
|
||||
subject
|
||||
expect(gestionnaire.follow?(dossier)).to be true
|
||||
end
|
||||
end
|
||||
|
||||
describe 'POST #process_dossier' do
|
||||
|
|
Loading…
Reference in a new issue