refactor messagerie_instructeur_avis_url
This commit is contained in:
parent
83fba55b29
commit
b0cfb2c02a
3 changed files with 3 additions and 3 deletions
|
@ -54,7 +54,7 @@ module Instructeurs
|
||||||
|
|
||||||
if @commentaire.save
|
if @commentaire.save
|
||||||
flash.notice = "Message envoyé"
|
flash.notice = "Message envoyé"
|
||||||
redirect_to messagerie_instructeur_avis_path(avis)
|
redirect_to messagerie_instructeur_avis_path(avis.procedure, avis)
|
||||||
else
|
else
|
||||||
flash.alert = @commentaire.errors.full_messages
|
flash.alert = @commentaire.errors.full_messages
|
||||||
render :messagerie
|
render :messagerie
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
%ul.tabs
|
%ul.tabs
|
||||||
= dynamic_tab_item('Demande', instructeur_avis_path(avis))
|
= dynamic_tab_item('Demande', instructeur_avis_path(avis))
|
||||||
= dynamic_tab_item('Avis', instruction_instructeur_avis_path(avis.procedure, avis), notification: avis.answer.blank?)
|
= dynamic_tab_item('Avis', instruction_instructeur_avis_path(avis.procedure, avis), notification: avis.answer.blank?)
|
||||||
= dynamic_tab_item('Messagerie', messagerie_instructeur_avis_path(avis))
|
= dynamic_tab_item('Messagerie', messagerie_instructeur_avis_path(avis.procedure, avis))
|
||||||
|
|
|
@ -105,7 +105,7 @@ describe Instructeurs::AvisController, type: :controller do
|
||||||
it do
|
it do
|
||||||
subject
|
subject
|
||||||
|
|
||||||
expect(response).to redirect_to(messagerie_instructeur_avis_path(avis_without_answer))
|
expect(response).to redirect_to(messagerie_instructeur_avis_path(avis_without_answer.procedure, avis_without_answer))
|
||||||
expect(dossier.commentaires.map(&:body)).to match(['commentaire body'])
|
expect(dossier.commentaires.map(&:body)).to match(['commentaire body'])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue