spec: fix syntax of get requests in archives_controller_spec

Those were generating Ruby warnings:

> warning: Using the last argument as keyword parameters is deprecated
This commit is contained in:
Pierre de La Morinerie 2021-09-02 16:35:36 -05:00
parent 92ca41ee4b
commit 5cbf939911

View file

@ -23,7 +23,7 @@ describe Instructeurs::ArchivesController, type: :controller do
end end
it 'displays archives' do it 'displays archives' do
get :index, { params: { procedure_id: procedure1.id } } get :index, params: { procedure_id: procedure1.id }
expect(assigns(:archives)).to eq([archive1]) expect(assigns(:archives)).to eq([archive1])
end end
@ -34,9 +34,7 @@ describe Instructeurs::ArchivesController, type: :controller do
let(:date_month) { Date.strptime(month, "%Y-%m") } let(:date_month) { Date.strptime(month, "%Y-%m") }
let(:archive) { create(:archive) } let(:archive) { create(:archive) }
let(:subject) do let(:subject) do
post :create, { post :create, params: { procedure_id: procedure1.id, type: 'monthly', month: month }
params: { procedure_id: procedure1.id, type: 'monthly', month: month }
}
end end
it "performs archive creation job" do it "performs archive creation job" do