require 'rails_helper'

RSpec.describe Training::Video, type: :model do
  subject { build(:training_video) }

  it { is_expected.to be_valid }

  describe 'associations' do
    it { should belong_to(:category) }
  end

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