rename route
This commit is contained in:
parent
4f5587cb66
commit
4d728962d0
6 changed files with 10 additions and 10 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue