Sha256: 49c7293cb71bd3ea7ca43fe5bbaf38d7291adc7288206195de928960ce71b246

Contents?: true

Size: 566 Bytes

Versions: 5

Compression:

Stored size: 566 Bytes

Contents

require 'spec_helper_models'

describe Gaku::GradingMethodSetItem do

  describe 'associations' do
    it { should belong_to :grading_method }
    it { should belong_to :grading_method_set }
  end

  describe 'validations' do
    it do
      should validate_uniqueness_of(:grading_method_id)
                .scoped_to(:grading_method_set_id)
                .with_message('Grading Method already added to Grading Method Set')
    end

    it { should validate_presence_of :grading_method_id }
    it { should validate_presence_of :grading_method_set_id }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gaku-0.2.4 core/spec/models/grading_method_set_item_spec.rb
gaku-0.2.3 core/spec/models/grading_method_set_item_spec.rb
gaku-0.2.2 core/spec/models/grading_method_set_item_spec.rb
gaku-0.2.1 core/spec/models/grading_method_set_item_spec.rb
gaku-0.2.0 core/spec/models/grading_method_set_item_spec.rb