Sha256: 3f8f8c95acfb9129919084aa4428f92f0fd3dfa943e367dfade3a045a72882d1

Contents?: true

Size: 656 Bytes

Versions: 8

Compression:

Stored size: 656 Bytes

Contents

require 'rails_helper'

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

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

    it 'should belong_to a assignment' do
      expect(CoalescingPanda::Submission.reflect_on_association(:assignment)).to_not be_nil
      expect(CoalescingPanda::Submission.reflect_on_association(:assignment).macro).to eql(:belongs_to)
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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