Gestionnaire: various missing procedure urls

This commit is contained in:
simon lehericey 2018-02-21 15:56:41 +01:00
parent 864b98c6dc
commit 630f22e205
4 changed files with 14 additions and 14 deletions

View file

@ -46,25 +46,25 @@ module NewGestionnaire
def follow
current_gestionnaire.follow(dossier)
flash.notice = 'Dossier suivi'
redirect_back(fallback_location: procedures_url)
redirect_back(fallback_location: gestionnaire_procedures_url)
end
def unfollow
current_gestionnaire.unfollow(dossier)
flash.notice = "Vous ne suivez plus le dossier nº #{dossier.id}"
redirect_back(fallback_location: procedures_url)
redirect_back(fallback_location: gestionnaire_procedures_url)
end
def archive
dossier.update_attributes(archived: true)
current_gestionnaire.unfollow(dossier)
redirect_back(fallback_location: procedures_url)
redirect_back(fallback_location: gestionnaire_procedures_url)
end
def unarchive
dossier.update_attributes(archived: false)
redirect_back(fallback_location: procedures_url)
redirect_back(fallback_location: gestionnaire_procedures_url)
end
def passer_en_instruction

View file

@ -116,7 +116,7 @@ module NewGestionnaire
procedure_presentation.update_attributes(sort: Procedure.default_sort)
end
redirect_back(fallback_location: procedure_url(procedure))
redirect_back(fallback_location: gestionnaire_procedure_url(procedure))
end
def update_sort
@ -138,7 +138,7 @@ module NewGestionnaire
procedure_presentation.update_attributes(sort: sort)
redirect_back(fallback_location: procedure_url(procedure))
redirect_back(fallback_location: gestionnaire_procedure_url(procedure))
end
def add_filter
@ -157,7 +157,7 @@ module NewGestionnaire
procedure_presentation.update_attributes(filters: filters.to_json)
end
redirect_back(fallback_location: procedure_url(procedure))
redirect_back(fallback_location: gestionnaire_procedure_url(procedure))
end
def remove_filter
@ -170,7 +170,7 @@ module NewGestionnaire
procedure_presentation.update_attributes(filters: filters.to_json)
redirect_back(fallback_location: procedure_url(procedure))
redirect_back(fallback_location: gestionnaire_procedure_url(procedure))
end
def download_dossiers

View file

@ -54,7 +54,7 @@ describe NewGestionnaire::DossiersController, type: :controller do
)
end
it { expect(response).to redirect_to(personnes_impliquees_dossier_url) }
it { expect(response).to redirect_to(personnes_impliquees_gestionnaire_dossier_url) }
end
describe '#follow' do
@ -64,7 +64,7 @@ describe NewGestionnaire::DossiersController, type: :controller do
it { expect(gestionnaire.followed_dossiers).to match([dossier]) }
it { expect(flash.notice).to eq('Dossier suivi') }
it { expect(response).to redirect_to(procedures_url) }
it { expect(response).to redirect_to(gestionnaire_procedures_url) }
end
describe '#unfollow' do
@ -76,7 +76,7 @@ describe NewGestionnaire::DossiersController, type: :controller do
it { expect(gestionnaire.followed_dossiers).to match([]) }
it { expect(flash.notice).to eq("Vous ne suivez plus le dossier nº #{dossier.id}") }
it { expect(response).to redirect_to(procedures_url) }
it { expect(response).to redirect_to(gestionnaire_procedures_url) }
end
describe '#archive' do
@ -88,7 +88,7 @@ describe NewGestionnaire::DossiersController, type: :controller do
end
it { expect(dossier.archived).to be true }
it { expect(response).to redirect_to(procedures_url) }
it { expect(response).to redirect_to(gestionnaire_procedures_url) }
it { expect(gestionnaire.followed_dossiers).not_to include(dossier) }
end
@ -100,7 +100,7 @@ describe NewGestionnaire::DossiersController, type: :controller do
end
it { expect(dossier.archived).to be false }
it { expect(response).to redirect_to(procedures_url) }
it { expect(response).to redirect_to(gestionnaire_procedures_url) }
end
describe '#passer_en_instruction' do

View file

@ -11,7 +11,7 @@ feature "procedure filters" do
before do
champ.update_attributes(value: "Mon champ rempli")
login_as gestionnaire, scope: :gestionnaire
visit procedure_path(procedure)
visit gestionnaire_procedure_path(procedure)
end
scenario "should display demandeur by default" do