You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
426 B
20 lines
426 B
# frozen_string_literal: true |
|
|
|
require 'rails_helper' |
|
|
|
RSpec.describe AuditLogPolicy do |
|
subject { described_class } |
|
|
|
let(:admin) { Fabricate(:admin_user).account } |
|
let(:account) { Fabricate(:account) } |
|
|
|
permissions :index? do |
|
context 'with an admin' do |
|
it { is_expected.to permit(admin, nil) } |
|
end |
|
|
|
context 'with a non-admin' do |
|
it { is_expected.to_not permit(account, nil) } |
|
end |
|
end |
|
end
|
|
|