require 'rails_helper'

describe Videos::ReportPublicationPolicy do
  let(:user_context) { build(:user_context) }

  subject { described_class }

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

    context 'as an admin' do
      let(:user) { build(:user, :admin) }
      
      it { is_expected.to permit(user_context, Videos::ReportPublication) }
    end
  end

  permissions :destroy? do
    it { is_expected.not_to permit(user_context, :create) }

    context 'as an admin' do
      let(:user) { build(:user, :admin) }
      
      it { is_expected.to permit(user_context, Videos::ReportPublication) }
    end
  end
end
