mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Added validation in EventSchedule model and test in event_schedule_spec
EventSchedule start time should be in hours range of the conference.Therefore it adds validation on start_time attribute of event schedule model. It also adds test for the same.
This commit is contained in:
parent
be33f345a1
commit
95d459f058
6 changed files with 48 additions and 8 deletions
|
|
@ -98,8 +98,8 @@ describe ApplicationHelper, type: :helper do
|
|||
@other_event = create(:event, program: conference.program, state: 'confirmed')
|
||||
schedule = create(:schedule, program: conference.program)
|
||||
conference.program.update_attributes!(selected_schedule: schedule)
|
||||
@event_schedule = create(:event_schedule, event: event, start_time: conference.start_date, room: create(:room), schedule: schedule)
|
||||
@other_event_schedule = create(:event_schedule, event: @other_event, start_time: conference.start_date, room: create(:room), schedule: schedule)
|
||||
@event_schedule = create(:event_schedule, event: event, start_time: conference.start_date + conference.start_hour.hours, room: create(:room), schedule: schedule)
|
||||
@other_event_schedule = create(:event_schedule, event: @other_event, start_time: conference.start_date + conference.start_hour.hours, room: create(:room), schedule: schedule)
|
||||
end
|
||||
|
||||
describe 'does return correct concurrent events' do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue