Introduce an association for the selected_schedule

Association in Program fot the selected_schedule
This commit is contained in:
Ana 2016-07-28 12:50:32 +02:00
parent 3f114629f9
commit beb17165a2
10 changed files with 24 additions and 21 deletions

View file

@ -39,8 +39,8 @@ describe ConferenceController do
it 'assigns variables' do
expect(assigns(:conference)).to eq conference
expect(assigns(:events_xml)).to eq conference.program.schedules.find(conference.program.selected_schedule).event_schedules
.order(start_time: :asc).map(&:event).group_by{ |event| event.scheduled_start_time.to_date }
expect(assigns(:events_xml)).to eq conference.program.selected_schedule.event_schedules.order(start_time: :asc)
.map(&:event).group_by{ |event| event.scheduled_start_time.to_date }
end
it 'renders successfully' do