mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Repeated sentence moved to a function
program.selected_schedule.event_schedules.order(start_time: :asc) was repeated several times and it has been moved to conference#selected_event_schedules
This commit is contained in:
parent
beb17165a2
commit
3897ec79ca
3 changed files with 12 additions and 9 deletions
|
|
@ -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.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.selected_event_schedules.map(&:event)
|
||||
.group_by{ |event| event.scheduled_start_time.to_date }
|
||||
end
|
||||
|
||||
it 'renders successfully' do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue