rename avis#all to avis#index
This commit is contained in:
parent
bbec76d33b
commit
1d86f863d3
4 changed files with 4 additions and 4 deletions
|
@ -10,7 +10,7 @@ module Instructeurs
|
|||
A_DONNER_STATUS = 'a-donner'
|
||||
DONNES_STATUS = 'donnes'
|
||||
|
||||
def all
|
||||
def index
|
||||
avis = current_instructeur.avis.includes(dossier: [groupe_instructeur: :procedure])
|
||||
@avis_by_procedure = avis.to_a.group_by(&:procedure)
|
||||
end
|
||||
|
|
|
@ -300,7 +300,7 @@ Rails.application.routes.draw do
|
|||
#
|
||||
|
||||
scope module: 'instructeurs', as: 'instructeur' do
|
||||
get 'avis', to: 'avis#all', as: 'all_avis'
|
||||
get 'avis', to: 'avis#index', as: 'all_avis'
|
||||
|
||||
# this redirections are ephemeral, to ensure that emails sent to experts before are still valid
|
||||
# TODO : they will be removed in September, 2020
|
||||
|
|
|
@ -12,8 +12,8 @@ describe Instructeurs::AvisController, type: :controller do
|
|||
|
||||
before { sign_in(instructeur.user) }
|
||||
|
||||
describe '#all' do
|
||||
before { get :all }
|
||||
describe '#index' do
|
||||
before { get :index }
|
||||
|
||||
it { expect(response).to have_http_status(:success) }
|
||||
it { expect(assigns(:avis_by_procedure).flatten).to include(procedure) }
|
||||
|
|
Loading…
Reference in a new issue