2019-04-28 21:10:54 +03:00
|
|
|
require "rails_helper"
|
2014-11-05 11:45:04 +02:00
|
|
|
|
2019-04-28 21:10:54 +03:00
|
|
|
RSpec.describe Slot, type: :model do
|
|
|
|
it "belongs to a hall" do
|
2014-11-05 11:45:04 +02:00
|
|
|
hall = create :hall
|
|
|
|
expect(build(:slot, hall_id: hall.id).hall).to eq hall
|
|
|
|
end
|
|
|
|
|
2019-04-28 21:10:54 +03:00
|
|
|
it "belongs to an event" do
|
2014-11-05 11:45:04 +02:00
|
|
|
event = create :event
|
|
|
|
expect(build(:slot, event_id: event.id).event).to eq event
|
|
|
|
end
|
|
|
|
end
|