mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
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:
parent
b8013661a2
commit
d1180e2767
35 changed files with 975 additions and 364 deletions
|
|
@ -8,7 +8,7 @@ describe Api::V1::ConferencesController do
|
|||
|
||||
describe 'GET #index' do
|
||||
before(:each) do
|
||||
get :index, format: :json
|
||||
get :index, params: { format: :json }
|
||||
@json = JSON.parse(response.body)['conferences']
|
||||
end
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ describe Api::V1::ConferencesController do
|
|||
|
||||
describe 'GET #show' do
|
||||
before(:each) do
|
||||
get :show, id: 'conf_two', format: :json
|
||||
get :show, params: { id: 'conf_two', format: :json }
|
||||
@json = JSON.parse(response.body)['conferences']
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ describe Api::V1::EventsController do
|
|||
context 'without conference scope' do
|
||||
it 'returns all confirmed events' do
|
||||
|
||||
get :index, format: :json
|
||||
get :index, params: { format: :json }
|
||||
json = JSON.parse(response.body)['events']
|
||||
expect(response).to be_success
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ describe Api::V1::EventsController do
|
|||
context 'with conference scope' do
|
||||
it 'returns all confirmed events 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)['events']
|
||||
|
||||
expect(response).to be_success
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ describe Api::V1::RoomsController do
|
|||
context 'without conference scope' do
|
||||
it 'returns all rooms' do
|
||||
|
||||
get :index, format: :json
|
||||
get :index, params: { format: :json }
|
||||
json = JSON.parse(response.body)['rooms']
|
||||
|
||||
expect(response).to be_success
|
||||
|
|
@ -26,7 +26,7 @@ describe Api::V1::RoomsController do
|
|||
context 'with conference scope' do
|
||||
it 'returns all rooms 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)['rooms']
|
||||
|
||||
expect(response).to be_success
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ describe Api::V1::TracksController do
|
|||
context 'without conference scope' do
|
||||
it 'returns all tracks' do
|
||||
|
||||
get :index, format: :json
|
||||
get :index, params: { format: :json }
|
||||
json = JSON.parse(response.body)['tracks']
|
||||
|
||||
expect(response).to be_success
|
||||
|
|
@ -25,7 +25,7 @@ describe Api::V1::TracksController do
|
|||
context 'with conference scope' do
|
||||
it 'returns all rooms 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)['tracks']
|
||||
|
||||
expect(response).to be_success
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue