Sha256: 980d42ee400d53c26b48583832bbfd21506b5a615b74ad736f8690830fc0c450
Contents?: true
Size: 604 Bytes
Versions: 7
Compression:
Stored size: 604 Bytes
Contents
require 'spec_helper' RSpec.describe Group, type: :model do let(:subject) { FactoryBot.create(:group) } describe 'validations' do it { should validate_presence_of(:canvas_id) } it { should validate_uniqueness_of(:canvas_id) } end describe 'associations' do it { should have_many(:group_memberships) } it do should belong_to(:course) .with_primary_key(:canvas_id) .with_foreign_key(:canvas_course_id) end it do should belong_to(:account) .with_primary_key(:canvas_id) .with_foreign_key(:canvas_account_id) end end end
Version data entries
7 entries across 7 versions & 1 rubygems