Sha256: b98177bbf0b550a963e3f39abfe49d4bc77f1b78bc11a46708bf3637b85e24c3
Contents?: true
Size: 564 Bytes
Versions: 3
Compression:
Stored size: 564 Bytes
Contents
require 'spec_helper' describe Gaku::ExtracurricularActivityEnrollment do describe 'associations' do it { should belong_to :extracurricular_activity } it { should belong_to :student } it { should have_many :school_roles } end describe 'validations' do it { should validate_presence_of :extracurricular_activity_id } it { should validate_presence_of :student_id } it { should validate_uniqueness_of(:student_id).scoped_to(:extracurricular_activity_id).with_message(/Already enrolled to the extracurricular activity!/) } end end
Version data entries
3 entries across 3 versions & 1 rubygems