Gestionnaire: various missing procedure urls
This commit is contained in:
parent
864b98c6dc
commit
630f22e205
4 changed files with 14 additions and 14 deletions
|
@ -46,25 +46,25 @@ module NewGestionnaire
|
||||||
def follow
|
def follow
|
||||||
current_gestionnaire.follow(dossier)
|
current_gestionnaire.follow(dossier)
|
||||||
flash.notice = 'Dossier suivi'
|
flash.notice = 'Dossier suivi'
|
||||||
redirect_back(fallback_location: procedures_url)
|
redirect_back(fallback_location: gestionnaire_procedures_url)
|
||||||
end
|
end
|
||||||
|
|
||||||
def unfollow
|
def unfollow
|
||||||
current_gestionnaire.unfollow(dossier)
|
current_gestionnaire.unfollow(dossier)
|
||||||
flash.notice = "Vous ne suivez plus le dossier nº #{dossier.id}"
|
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
|
end
|
||||||
|
|
||||||
def archive
|
def archive
|
||||||
dossier.update_attributes(archived: true)
|
dossier.update_attributes(archived: true)
|
||||||
current_gestionnaire.unfollow(dossier)
|
current_gestionnaire.unfollow(dossier)
|
||||||
redirect_back(fallback_location: procedures_url)
|
redirect_back(fallback_location: gestionnaire_procedures_url)
|
||||||
end
|
end
|
||||||
|
|
||||||
def unarchive
|
def unarchive
|
||||||
dossier.update_attributes(archived: false)
|
dossier.update_attributes(archived: false)
|
||||||
redirect_back(fallback_location: procedures_url)
|
redirect_back(fallback_location: gestionnaire_procedures_url)
|
||||||
end
|
end
|
||||||
|
|
||||||
def passer_en_instruction
|
def passer_en_instruction
|
||||||
|
|
|
@ -116,7 +116,7 @@ module NewGestionnaire
|
||||||
procedure_presentation.update_attributes(sort: Procedure.default_sort)
|
procedure_presentation.update_attributes(sort: Procedure.default_sort)
|
||||||
end
|
end
|
||||||
|
|
||||||
redirect_back(fallback_location: procedure_url(procedure))
|
redirect_back(fallback_location: gestionnaire_procedure_url(procedure))
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_sort
|
def update_sort
|
||||||
|
@ -138,7 +138,7 @@ module NewGestionnaire
|
||||||
|
|
||||||
procedure_presentation.update_attributes(sort: sort)
|
procedure_presentation.update_attributes(sort: sort)
|
||||||
|
|
||||||
redirect_back(fallback_location: procedure_url(procedure))
|
redirect_back(fallback_location: gestionnaire_procedure_url(procedure))
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_filter
|
def add_filter
|
||||||
|
@ -157,7 +157,7 @@ module NewGestionnaire
|
||||||
procedure_presentation.update_attributes(filters: filters.to_json)
|
procedure_presentation.update_attributes(filters: filters.to_json)
|
||||||
end
|
end
|
||||||
|
|
||||||
redirect_back(fallback_location: procedure_url(procedure))
|
redirect_back(fallback_location: gestionnaire_procedure_url(procedure))
|
||||||
end
|
end
|
||||||
|
|
||||||
def remove_filter
|
def remove_filter
|
||||||
|
@ -170,7 +170,7 @@ module NewGestionnaire
|
||||||
|
|
||||||
procedure_presentation.update_attributes(filters: filters.to_json)
|
procedure_presentation.update_attributes(filters: filters.to_json)
|
||||||
|
|
||||||
redirect_back(fallback_location: procedure_url(procedure))
|
redirect_back(fallback_location: gestionnaire_procedure_url(procedure))
|
||||||
end
|
end
|
||||||
|
|
||||||
def download_dossiers
|
def download_dossiers
|
||||||
|
|
|
@ -54,7 +54,7 @@ describe NewGestionnaire::DossiersController, type: :controller do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
it { expect(response).to redirect_to(personnes_impliquees_dossier_url) }
|
it { expect(response).to redirect_to(personnes_impliquees_gestionnaire_dossier_url) }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#follow' do
|
describe '#follow' do
|
||||||
|
@ -64,7 +64,7 @@ describe NewGestionnaire::DossiersController, type: :controller do
|
||||||
|
|
||||||
it { expect(gestionnaire.followed_dossiers).to match([dossier]) }
|
it { expect(gestionnaire.followed_dossiers).to match([dossier]) }
|
||||||
it { expect(flash.notice).to eq('Dossier suivi') }
|
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
|
end
|
||||||
|
|
||||||
describe '#unfollow' do
|
describe '#unfollow' do
|
||||||
|
@ -76,7 +76,7 @@ describe NewGestionnaire::DossiersController, type: :controller do
|
||||||
|
|
||||||
it { expect(gestionnaire.followed_dossiers).to match([]) }
|
it { expect(gestionnaire.followed_dossiers).to match([]) }
|
||||||
it { expect(flash.notice).to eq("Vous ne suivez plus le dossier nº #{dossier.id}") }
|
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
|
end
|
||||||
|
|
||||||
describe '#archive' do
|
describe '#archive' do
|
||||||
|
@ -88,7 +88,7 @@ describe NewGestionnaire::DossiersController, type: :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
it { expect(dossier.archived).to be true }
|
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) }
|
it { expect(gestionnaire.followed_dossiers).not_to include(dossier) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ describe NewGestionnaire::DossiersController, type: :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
it { expect(dossier.archived).to be false }
|
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
|
end
|
||||||
|
|
||||||
describe '#passer_en_instruction' do
|
describe '#passer_en_instruction' do
|
||||||
|
|
|
@ -11,7 +11,7 @@ feature "procedure filters" do
|
||||||
before do
|
before do
|
||||||
champ.update_attributes(value: "Mon champ rempli")
|
champ.update_attributes(value: "Mon champ rempli")
|
||||||
login_as gestionnaire, scope: :gestionnaire
|
login_as gestionnaire, scope: :gestionnaire
|
||||||
visit procedure_path(procedure)
|
visit gestionnaire_procedure_path(procedure)
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "should display demandeur by default" do
|
scenario "should display demandeur by default" do
|
||||||
|
|
Loading…
Reference in a new issue