Sha256: 4b11e06e4a525e78a2aac354b0792748dceafda50d4517c84595f1877f8fd3ce
Contents?: true
Size: 607 Bytes
Versions: 127
Compression:
Stored size: 607 Bytes
Contents
require 'spec_helper' RSpec.describe User, type: :model do let(:subject) { FactoryGirl.create(:user) } 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 have_many(:enrollments) .with_primary_key(:canvas_id) .with_foreign_key(:canvas_user_id) end it do should have_many(:submissions) .with_primary_key(:canvas_id) .with_foreign_key(:canvas_user_id) end end end
Version data entries
127 entries across 127 versions & 1 rubygems