mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
21 lines
549 B
Ruby
21 lines
549 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 'has a valid factory' do
|
|
expect(build(:event_schedule)).to be_valid
|
|
end
|
|
|
|
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
|