Follow: add flash notice to dossier_controller

This commit is contained in:
Simon Lehericey 2017-07-17 12:28:09 +02:00 committed by Mathieu Magnin
parent 95fbd1824a
commit b80d6a6a59
2 changed files with 5 additions and 0 deletions

View file

@ -38,6 +38,7 @@ describe NewGestionnaire::DossiersController, type: :controller do
end
it { expect(gestionnaire.followed_dossiers).to match([dossier]) }
it { expect(flash.notice).to eq('Dossier suivi') }
it { expect(response).to redirect_to(procedures_url) }
end
@ -49,6 +50,7 @@ describe NewGestionnaire::DossiersController, type: :controller do
end
it { expect(gestionnaire.followed_dossiers).to match([]) }
it { expect(flash.notice).to eq("Vous ne suivez plus le dossier nº #{dossier.id}") }
it { expect(response).to redirect_to(procedures_url) }
end