Improve Error messages

- Improve error messages in event schedules, schedules and program controller.
- Two respond_to blocks in the update method of program controller.
This commit is contained in:
Ana 2016-08-08 18:29:31 +02:00
parent c687c1072e
commit e8261d41bc
4 changed files with 13 additions and 11 deletions

View file

@ -62,7 +62,7 @@ describe Admin::EventSchedulesController do
room_id: nil,
start_time: nil)
expect(JSON.parse(response.body)['status']).to_not eq('ok')
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")
end
end
end
@ -119,7 +119,7 @@ describe Admin::EventSchedulesController do
room_id: nil,
start_time: nil)
expect(JSON.parse(response.body)['status']).to_not eq('ok')
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")
end
end
end