Sha256: 6b7e01e2b6714876a04e4ef85369ddab1c4fb019d3aa0d1d749cf24a3f842fee
Contents?: true
Size: 861 Bytes
Versions: 8
Compression:
Stored size: 861 Bytes
Contents
require 'rails_helper' RSpec.describe CoalescingPanda::Section, :type => :model do let(:section) { FactoryGirl.create(:section) } context "associations" do it 'should belong_to a course' do expect(CoalescingPanda::Section.reflect_on_association(:course)).to_not be_nil expect(CoalescingPanda::Section.reflect_on_association(:course).macro).to eql(:belongs_to) end it 'should have many enrollments' do expect(CoalescingPanda::Section.reflect_on_association(:enrollments)).to_not be_nil expect(CoalescingPanda::Section.reflect_on_association(:enrollments).macro).to eql(:has_many) end it 'should have many users' do expect(CoalescingPanda::Section.reflect_on_association(:users)).to_not be_nil expect(CoalescingPanda::Section.reflect_on_association(:users).macro).to eql(:has_many) end end end
Version data entries
8 entries across 8 versions & 1 rubygems