Sha256: fea34e0c931180777d9ded3bdf19b71ef71dc031805ce8269a6dfe2b89cd0549
Contents?: true
Size: 648 Bytes
Versions: 34
Compression:
Stored size: 648 Bytes
Contents
require 'spec_helper' RSpec.describe AssignmentGroup, type: :model do let(:subject) { FactoryGirl.create(:assignment_group) } describe 'validations' do it { should validate_presence_of(:canvas_assignment_group_id) } it { should validate_uniqueness_of(:canvas_assignment_group_id) } end describe 'associations' do it do should belong_to(:course) .with_primary_key(:canvas_course_id) .with_foreign_key(:canvas_course_id) end it do should have_many(:assignments) .with_primary_key(:canvas_assignment_group_id) .with_foreign_key(:canvas_assignment_group_id) end end end
Version data entries
34 entries across 34 versions & 1 rubygems