add procedure_id to column.id
This commit is contained in:
parent
3c7521a428
commit
3740a79219
14 changed files with 65 additions and 49 deletions
|
@ -886,12 +886,14 @@ describe Instructeurs::ProceduresController, type: :controller do
|
|||
end
|
||||
|
||||
it 'can change order' do
|
||||
expect { get :update_sort, params: { procedure_id: procedure.id, column_id: "individual/nom", order: 'asc' } }
|
||||
column_id = Column.make_id(procedure.id, "individual", "nom")
|
||||
expect { get :update_sort, params: { procedure_id: procedure.id, column_id:, order: 'asc' } }
|
||||
.to change { procedure_presentation.sort }
|
||||
.from({ "column" => "notifications", "order" => "desc", "table" => "notifications" })
|
||||
.to({ "column" => "nom", "order" => "asc", "table" => "individual" })
|
||||
end
|
||||
end
|
||||
|
||||
describe '#add_filter' do
|
||||
let(:instructeur) { create(:instructeur) }
|
||||
let(:procedure) { create(:procedure, :for_individual) }
|
||||
|
@ -903,7 +905,8 @@ describe Instructeurs::ProceduresController, type: :controller do
|
|||
end
|
||||
|
||||
subject do
|
||||
post :add_filter, params: { procedure_id: procedure.id, column: "individual/nom", value: "n" * 110, statut: "a-suivre" }
|
||||
column = Column.make_id(procedure.id, "individual", "nom")
|
||||
post :add_filter, params: { procedure_id: procedure.id, column:, value: "n" * 110, statut: "a-suivre" }
|
||||
end
|
||||
|
||||
it 'should render the error' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue