Change URL for not found procedure
This commit is contained in:
parent
e66daf3b95
commit
de0acc0a22
3 changed files with 6 additions and 3 deletions
|
@ -156,6 +156,8 @@ class Users::DossiersController < UsersController
|
|||
end
|
||||
|
||||
def error_procedure
|
||||
render :file => "#{Rails.root}/public/404_procedure_not_found.html", :status => 404
|
||||
flash.alert = t('errors.messages.procedure_not_found')
|
||||
|
||||
redirect_to url_for users_dossiers_path
|
||||
end
|
||||
end
|
||||
|
|
|
@ -93,6 +93,7 @@ fr:
|
|||
dossier_not_found: "Le dossier n'existe pas ou vous n'y avez pas accès."
|
||||
dossier_map_not_activated: "Le dossier n'a pas accès à la cartographie."
|
||||
invalid_siret: "Le siret est incorrect"
|
||||
procedure_not_found: "La procédure n'existe pas"
|
||||
france_connect:
|
||||
connexion: "Erreur lors de la connexion à France Connect."
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ describe Users::DossiersController, type: :controller do
|
|||
context 'when procedure is archived' do
|
||||
let(:procedure) { create(:procedure, archived: 'true') }
|
||||
|
||||
it { is_expected.to have_http_status(404) }
|
||||
it { is_expected.to redirect_to users_dossiers_path }
|
||||
end
|
||||
end
|
||||
context 'when user is not logged' do
|
||||
|
@ -61,7 +61,7 @@ describe Users::DossiersController, type: :controller do
|
|||
sign_in create(:user)
|
||||
end
|
||||
|
||||
it { is_expected.to have_http_status(404) }
|
||||
it { is_expected.to redirect_to users_dossiers_path }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue