mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Render errors in JSON in the schedule correctly
This commit is contained in:
parent
e8261d41bc
commit
a1c7f67735
5 changed files with 32 additions and 37 deletions
|
|
@ -37,7 +37,6 @@ describe Admin::EventSchedulesController do
|
|||
start_time: conference.start_date)
|
||||
|
||||
expect(response).to be_success
|
||||
expect(JSON.parse(response.body)['status']).to eq('ok')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -62,7 +61,7 @@ describe Admin::EventSchedulesController do
|
|||
room_id: nil,
|
||||
start_time: nil)
|
||||
|
||||
expect(JSON.parse(response.body)['status']).to eq("The event couldn't be scheduled. Event can't be blank. Room can't be blank. Start time can't be blank")
|
||||
expect(response.status).to eq(422)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -94,7 +93,6 @@ describe Admin::EventSchedulesController do
|
|||
start_time: conference.start_date)
|
||||
|
||||
expect(response).to be_success
|
||||
expect(JSON.parse(response.body)['status']).to eq('ok')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -119,7 +117,7 @@ describe Admin::EventSchedulesController do
|
|||
room_id: nil,
|
||||
start_time: nil)
|
||||
|
||||
expect(JSON.parse(response.body)['status']).to eq("The event couldn't be scheduled. Event can't be blank. Room can't be blank. Start time can't be blank")
|
||||
expect(response.status).to eq(422)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -136,7 +134,6 @@ describe Admin::EventSchedulesController do
|
|||
delete :destroy, id: event_schedule.id, conference_id: conference.short_title
|
||||
|
||||
expect(response).to be_success
|
||||
expect(JSON.parse(response.body)['status']).to eq('ok')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue