Change render « show » by redirect_to backoffice_dossier_path(id) in dossier controller POST action

This commit is contained in:
Xavier J 2016-12-19 17:11:26 +01:00
parent d4790f8277
commit f1ae1d8dea
2 changed files with 14 additions and 4 deletions

View file

@ -91,7 +91,7 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
NotificationMailer.dossier_received(@facade.dossier).deliver_now!
render 'show'
redirect_to backoffice_dossier_path(id: @facade.dossier.id)
end
def refuse
@ -102,7 +102,7 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
NotificationMailer.dossier_refused(@facade.dossier).deliver_now!
render 'show'
redirect_to backoffice_dossier_path(id: @facade.dossier.id)
end
def without_continuation
@ -113,7 +113,7 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
NotificationMailer.dossier_without_continuation(@facade.dossier).deliver_now!
render 'show'
redirect_to backoffice_dossier_path(id: @facade.dossier.id)
end
def close
@ -124,7 +124,7 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
NotificationMailer.dossier_closed(@facade.dossier).deliver_now!
render 'show'
redirect_to backoffice_dossier_path(id: @facade.dossier.id)
end
def follow

View file

@ -155,6 +155,8 @@ describe Backoffice::DossiersController, type: :controller do
subject
end
it { is_expected.to redirect_to backoffice_dossier_path(id: dossier.id) }
end
describe 'POST #receive' do
@ -182,6 +184,8 @@ describe Backoffice::DossiersController, type: :controller do
subject
end
it { is_expected.to redirect_to backoffice_dossier_path(id: dossier.id) }
end
describe 'POST #refuse' do
@ -205,6 +209,8 @@ describe Backoffice::DossiersController, type: :controller do
subject
end
it { is_expected.to redirect_to backoffice_dossier_path(id: dossier.id) }
end
describe 'POST #without_continuation' do
@ -228,6 +234,8 @@ describe Backoffice::DossiersController, type: :controller do
subject
end
it { is_expected.to redirect_to backoffice_dossier_path(id: dossier.id) }
end
describe 'POST #close' do
@ -250,6 +258,8 @@ describe Backoffice::DossiersController, type: :controller do
subject
end
it { is_expected.to redirect_to backoffice_dossier_path(id: dossier.id) }
end
describe 'PUT #toggle_follow' do