From 1989a33da10f50918d3f010940ba8b96440aced0 Mon Sep 17 00:00:00 2001 From: Ana Date: Wed, 10 Aug 2016 11:17:23 +0200 Subject: [PATCH] Test namings Test namings in event_schedules and schedules controllers. --- .../admin/event_schedules_controller_spec.rb | 10 +++++----- spec/controllers/schedules_controller_spec.rb | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/controllers/admin/event_schedules_controller_spec.rb b/spec/controllers/admin/event_schedules_controller_spec.rb index edac3088..4d0569ec 100644 --- a/spec/controllers/admin/event_schedules_controller_spec.rb +++ b/spec/controllers/admin/event_schedules_controller_spec.rb @@ -30,7 +30,7 @@ describe Admin::EventSchedulesController do expect{ create_action }.to change { EventSchedule.count }.by 1 end - it 'renders JSON without errors' do + it 'has 200 status code' do create_action expect(response).to be_success end @@ -51,7 +51,7 @@ describe Admin::EventSchedulesController do expect{ create_action }.to_not change { EventSchedule.count } end - it 'renders JSON with error' do + it 'has 422 status code' do create_action expect(response.status).to eq(422) end @@ -78,7 +78,7 @@ describe Admin::EventSchedulesController do expect(event_schedule.start_time).to eq(conference.start_date) end - it 'renders JSON without errors' do + it 'has 200 status code' do expect(response).to be_success end end @@ -96,7 +96,7 @@ describe Admin::EventSchedulesController do expect{ update_action }.to_not change { event_schedule } end - it 'renders JSON with error' do + it 'has 422 status code' do update_action expect(response.status).to eq(422) end @@ -112,7 +112,7 @@ describe Admin::EventSchedulesController do expect{ destroy_action }.to change { EventSchedule.count }.by(-1) end - it 'renders JSON without errors' do + it 'has 200 status code' do destroy_action expect(response).to be_success end diff --git a/spec/controllers/schedules_controller_spec.rb b/spec/controllers/schedules_controller_spec.rb index 975ea92e..6ff4875c 100644 --- a/spec/controllers/schedules_controller_spec.rb +++ b/spec/controllers/schedules_controller_spec.rb @@ -20,7 +20,7 @@ describe SchedulesController do .group_by{ |event| event.time.to_date } end - it 'renders successfully' do + it 'has 200 status code' do expect(response).to be_success end end