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
|
|
@ -9,7 +9,7 @@ FactoryGirl.define do
|
|||
venue = create(:venue, conference: program.conference)
|
||||
end
|
||||
(event_schedule.room = create(:room, venue: venue)) unless event_schedule.room.present?
|
||||
(event_schedule.start_time = program.conference.start_date.to_time) unless event_schedule.start_time.present?
|
||||
(event_schedule.start_time = program.conference.start_date + program.conference.start_hour.hours) unless event_schedule.start_time.present?
|
||||
unless event_schedule.schedule.present?
|
||||
unless program.selected_schedule.present?
|
||||
schedule = create(:schedule, program: program)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue