1 # frozen_string_literal: true
5 class GuestApiAbilityTest < ActiveSupport::TestCase
6 test "note permissions for a guest" do
8 ability = ApiAbility.new nil, scopes
10 [:index, :create, :feed, :show, :search].each do |action|
11 assert ability.can?(action, Note), "should be able to #{action} Notes"
14 [:comment, :close, :reopen, :destroy].each do |action|
15 assert ability.cannot?(action, Note), "should not be able to #{action} Notes"