2018-05-07 16:47:29 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2021-02-20 09:57:27 -08:00
|
|
|
# == Schema Information
|
|
|
|
|
#
|
|
|
|
|
# Table name: schedules
|
|
|
|
|
#
|
|
|
|
|
# id :bigint not null, primary key
|
|
|
|
|
# created_at :datetime not null
|
|
|
|
|
# updated_at :datetime not null
|
|
|
|
|
# program_id :integer
|
|
|
|
|
# track_id :integer
|
|
|
|
|
#
|
|
|
|
|
# Indexes
|
|
|
|
|
#
|
|
|
|
|
# index_schedules_on_program_id (program_id)
|
|
|
|
|
# index_schedules_on_track_id (track_id)
|
|
|
|
|
#
|
2016-07-08 13:27:42 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
|
|
describe Schedule do
|
|
|
|
|
|
|
|
|
|
describe 'association' do
|
|
|
|
|
it { should belong_to(:program) }
|
2017-08-09 18:12:20 +03:00
|
|
|
it { should belong_to(:track) }
|
2016-07-08 13:27:42 +02:00
|
|
|
it { should have_many(:event_schedules).dependent(:destroy) }
|
2016-07-31 18:41:27 +02:00
|
|
|
it { should have_many(:events).through(:event_schedules) }
|
2016-07-08 13:27:42 +02:00
|
|
|
end
|
|
|
|
|
end
|