require 'rails_helper'

RSpec.describe Service::Opportunity, type: :model do
  subject { build(:service_opportunity) }

  it { is_expected.to be_valid }

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

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