diff --git a/config/routes.rb b/config/routes.rb index a54e0e2e1..df7e0fe66 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -43,8 +43,8 @@ Rails.application.routes.draw do end namespace :admin do - get '/dossier/:dossier_id' => 'dossier#show' - get '/dossier' => 'dossier#index' + get '/dossiers/:dossier_id' => 'dossier#show' + get '/dossiers' => 'dossier#index' end # The priority is based upon order of creation: first created -> highest priority. diff --git a/spec/controllers/admin/dossier_controller_spec.rb b/spec/controllers/admin/dossier_controller_spec.rb index 93a975ae0..eca906a43 100644 --- a/spec/controllers/admin/dossier_controller_spec.rb +++ b/spec/controllers/admin/dossier_controller_spec.rb @@ -38,7 +38,7 @@ RSpec.describe Admin::DossierController, type: :controller do it 'le numéro de dossier est correct' do get :index, :dossier_id => dossier_id - expect(response).to redirect_to("/admin/dossier/#{dossier_id}") + expect(response).to redirect_to("/admin/dossiers/#{dossier_id}") end it 'il n\' y a pas de numéro de dossier' do diff --git a/spec/controllers/commentaires_controller_spec.rb b/spec/controllers/commentaires_controller_spec.rb index 1c24f9ec6..e7c1d8409 100644 --- a/spec/controllers/commentaires_controller_spec.rb +++ b/spec/controllers/commentaires_controller_spec.rb @@ -15,9 +15,9 @@ describe CommentairesController, type: :controller do end it 'depuis la page admin' do - request.env["HTTP_REFERER"] = "/admin/dossier" + request.env["HTTP_REFERER"] = "/admin/dossiers" post :create, :dossier_id => dossier_id, :email_commentaire => email_commentaire, :texte_commentaire => texte_commentaire - expect(response).to redirect_to("/admin/dossier/#{dossier_id}") + expect(response).to redirect_to("/admin/dossiers/#{dossier_id}") end end end diff --git a/spec/features/admin/dossier_page/_commentaires_flux_spec.rb b/spec/features/admin/dossier_page/_commentaires_flux_spec.rb index c47d754a9..4a5c47663 100644 --- a/spec/features/admin/dossier_page/_commentaires_flux_spec.rb +++ b/spec/features/admin/dossier_page/_commentaires_flux_spec.rb @@ -12,7 +12,7 @@ feature '_Commentaires_Flux Admin/Dossier#Show Page' do before do dossier.build_default_pieces_jointes login_admin - visit "/admin/dossier/#{dossier_id}" + visit "/admin/dossiers/#{dossier_id}" end context 'Affichage du flux de commentaire' do diff --git a/spec/features/admin/dossier_page/show_page_spec.rb b/spec/features/admin/dossier_page/show_page_spec.rb index 6968a4706..e6d74e30e 100644 --- a/spec/features/admin/dossier_page/show_page_spec.rb +++ b/spec/features/admin/dossier_page/show_page_spec.rb @@ -7,7 +7,7 @@ feature 'Admin/Dossier#Show Page' do before do dossier.build_default_pieces_jointes login_admin - visit "/admin/dossier/#{dossier_id}" + visit "/admin/dossiers/#{dossier_id}" end context 'sur la page admin du dossier' do @@ -68,7 +68,7 @@ feature 'Admin/Dossier#Show Page' do piece_jointe = dossier.pieces_jointes.where(type_piece_jointe_id: 388).first piece_jointe.content = content piece_jointe.save! - visit "/admin/dossier/#{dossier_id}" + visit "/admin/dossiers/#{dossier_id}" end scenario 'la ligne de la pièce jointe est présente' do diff --git a/spec/features/start_page/index_page_spec.rb b/spec/features/start_page/index_page_spec.rb index d04a4a365..7760c2133 100644 --- a/spec/features/start_page/index_page_spec.rb +++ b/spec/features/start_page/index_page_spec.rb @@ -77,8 +77,8 @@ feature 'Start#Index Page' do end context 'dans la section admninistration' do - scenario 'le formulaire envoie vers /admin/dossier en #GET' do - expect(page).to have_selector("form[action='/admin/dossier'][method=get]") + scenario 'le formulaire envoie vers /admin/dossiers en #GET' do + expect(page).to have_selector("form[action='/admin/dossiers'][method=get]") end scenario ' le champs "Identifiant" n\'est pas présent' do