require 'rails_helper'

RSpec.describe ContractPolicy do
  let(:user_context) { create(:user_context, user: user, account: user.primary_account) }

  subject { described_class }

  context "for an associate" do
    let(:user) { create(:user, :associate) }

    permissions :show? do
      it { is_expected.not_to permit(user_context, :show) }
    end
  end

  context "for a manager" do
    let(:user) { create(:user, :manager) }

    permissions :show? do
      it { is_expected.to permit(user_context, :show) }
    end
  end
end
