Sha256: 50f961289a8fede5e75fd91a18503be546271996d1ee4adf999e2282aaf92d5f

Contents?: true

Size: 662 Bytes

Versions: 8

Compression:

Stored size: 662 Bytes

Contents

require 'rails_helper'

RSpec.describe CoalescingPanda::Assignment, :type => :model do
  let(:assignment) { FactoryGirl.create(:assignment) }

  context "associations" do
    it 'should belong_to a course' do
      expect(CoalescingPanda::Assignment.reflect_on_association(:course)).to_not be_nil
      expect(CoalescingPanda::Assignment.reflect_on_association(:course).macro).to eql(:belongs_to)
    end

    it 'should have many submisssions' do
      expect(CoalescingPanda::Assignment.reflect_on_association(:submissions)).to_not be_nil
      expect(CoalescingPanda::Assignment.reflect_on_association(:submissions).macro).to eql(:has_many)
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
coalescing_panda-3.1.5 spec/models/coalescing_panda/assignment_spec.rb
coalescing_panda-3.1.4 spec/models/coalescing_panda/assignment_spec.rb
coalescing_panda-3.1.3 spec/models/coalescing_panda/assignment_spec.rb
coalescing_panda-3.1.2 spec/models/coalescing_panda/assignment_spec.rb
coalescing_panda-3.1.1 spec/models/coalescing_panda/assignment_spec.rb
coalescing_panda-3.1.0 spec/models/coalescing_panda/assignment_spec.rb
coalescing_panda-3.0.1 spec/models/coalescing_panda/assignment_spec.rb
coalescing_panda-3.0.0 spec/models/coalescing_panda/assignment_spec.rb