osem-fcy/spec/models/event_schedule_spec.rb
Ana 0b26ed5c35 EventSchedule validations
event, schedule, room and start_time are mandatory in EventSchedule.
2016-08-11 15:11:27 +02:00

17 lines
459 B
Ruby

require 'spec_helper'
describe EventSchedule do
describe 'association' do
it { should belong_to(:schedule) }
it { should belong_to(:event) }
it { should belong_to(:room) }
end
describe 'validation' do
it { is_expected.to validate_presence_of(:schedule) }
it { is_expected.to validate_presence_of(:event) }
it { is_expected.to validate_presence_of(:room) }
it { is_expected.to validate_presence_of(:start_time) }
end
end