Use keyword arguments in tests

Raisl 5.1 removes support for non-keyword arguments in `#process`,
`#get`, `#post`, `#patch`, `#put`, `#delete`, and `#head` for the
`ActionDispatch::IntegrationTest` and `ActionController::TestCase`
classes. This means we have to add `params` everywhere in the controller
tests.
This commit is contained in:
Ana María Martínez Gómez 2019-05-13 17:42:09 +02:00
parent b8013661a2
commit d1180e2767
No known key found for this signature in database
GPG key ID: EACB9B4BC80C0347
35 changed files with 975 additions and 364 deletions

View file

@ -11,7 +11,7 @@ describe Admin::ProgramsController, type: :controller do
context 'not logged in user' do
describe 'GET #show' do
it 'does not render admin/programs#show' do
get :show, conference_id: conference.short_title
get :show, params: { conference_id: conference.short_title }
expect(response).to redirect_to(user_session_path)
end
end
@ -24,7 +24,7 @@ describe Admin::ProgramsController, type: :controller do
describe 'PATCH #update' do
it 'redirects to admin/programs#index' do
patch :update, conference_id: conference.short_title, program: attributes_for(:program)
patch :update, params: { conference_id: conference.short_title, program: attributes_for(:program) }
conference.program.reload
expect(response).to redirect_to admin_conference_program_path(conference.short_title)
end