require 'rails_helper'

RSpec.describe Discipline::Group, type: :model do
  subject { build(:discipline_group) }

  it { is_expected.to be_valid }

  describe 'associations' do
    it { should belong_to(:school) }
    it { should have_many(:violations) }
  end

  describe 'validations' do
    it { should validate_presence_of(:name) }
    it { should validate_length_of(:name).is_at_most(16) }
    it { should validate_length_of(:description).is_at_most(64) }
  end
end
