clarion/spec/models/slot_spec.rb
2015-04-17 03:56:57 +03:00

14 lines
311 B
Ruby

require 'rails_helper'
RSpec.describe Slot, :type => :model do
it 'belongs to a hall' do
hall = create :hall
expect(build(:slot, hall_id: hall.id).hall).to eq hall
end
it 'belongs to an event' do
event = create :event
expect(build(:slot, event_id: event.id).event).to eq event
end
end