require 'rails_helper'

RSpec.describe Support::Token, type: :model do
  subject { build(:support_token) }

  it { is_expected.to be_valid }

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

  describe 'validations' do
    it { should validate_presence_of(:current) }
    it { should validate_presence_of(:client) }
    it { should validate_presence_of(:expiry) }
    it { should validate_uniqueness_of(:client) }
  end
end
