upload_cache_policy_spec.rb 466 B

1234567891011121314151617181920
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. describe UploadCachePolicy do
  4. subject { described_class.new(user, record) }
  5. let(:record) { UploadCache.new(123) }
  6. let(:user) { create(:user) }
  7. context 'without a user' do
  8. let(:user) { nil }
  9. it { is_expected.to permit_actions :show, :destroy }
  10. end
  11. context 'with a user' do
  12. it { is_expected.to permit_actions :show, :destroy }
  13. end
  14. end