Sha256: 9a54a401fc905f2a72df34f06ad612a6822301d9a934b37c7ba9cad0dec44818
Contents?: true
Size: 578 Bytes
Versions: 35
Compression:
Stored size: 578 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_user_id) } it { should validate_uniqueness_of(:canvas_user_id) } end describe 'associations' do it do should have_many(:enrollments) .with_primary_key(:canvas_user_id) .with_foreign_key(:canvas_user_id) end it do should have_many(:submissions) .with_primary_key(:canvas_user_id) .with_foreign_key(:canvas_user_id) end end end
Version data entries
35 entries across 35 versions & 1 rubygems