require 'rails_helper'

RSpec.describe Discipline::Violation, type: :model do
  subject { build(:discipline_violation) }

  it { is_expected.to be_valid }

  describe 'associations' do
    it { should belong_to(:school) }
    it { should belong_to(:group).optional }
    it { should have_many(:student_logs) }
  end

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