require "rails_helper"

describe ProfilePolicy do
  subject { described_class }

  let(:current_user) { build(:user) }
  let(:user_context) { build(:user_context, user: current_user) }

  context "for my own record" do
    permissions :show? do
      it { is_expected.to permit(user_context, current_user) }
    end
  end

  context "for another record" do
    let(:another_user) { build(:user) }

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