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

@ -19,7 +19,7 @@ describe Api::V1::SpeakersController do
context 'without conference scope' do
it 'returns all speakers' do
get :index, format: :json
get :index, params: { format: :json }
json = JSON.parse(response.body)['speakers']
expect(response).to be_success
expect(json.length).to eq(2)
@ -31,7 +31,7 @@ describe Api::V1::SpeakersController do
context 'with conference scope' do
it 'returns all speakers of conference' do
get :index, conference_id: conference.short_title, format: :json
get :index, params: { conference_id: conference.short_title, format: :json }
json = JSON.parse(response.body)['speakers']
expect(response).to be_success