Sha256: b2d99789f12a79676c9c912fcf2315f682e9cdc1d745f9ae1d366dc51c97dc74

Contents?: true

Size: 609 Bytes

Versions: 14

Compression:

Stored size: 609 Bytes

Contents

require_relative 'base'

module ControllerExtensions
  class PseudoRoleTest < Base
    %i[all everyone everybody anyone].each do |pseudorole|
      test "allow #{pseudorole} allows all" do
        @tester.acl_block! do
          allow send pseudorole
        end

        assert_equal :deny, @tester.default_action
        assert_all_permitted
      end

      test "deny #{pseudorole} denies all" do
        @tester.acl_block! do
          default :allow
          deny send pseudorole
        end

        assert_equal :allow, @tester.default_action
        assert_all_forbidden
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
careacademy-acl9-3.4.0 test/controller_extensions/pseudo_role_test.rb
careacademy-acl9-3.3.0 test/controller_extensions/pseudo_role_test.rb
acl9-3.2.0 test/controller_extensions/pseudo_role_test.rb
acl9-3.1.0 test/controller_extensions/pseudo_role_test.rb
acl9-3.0.0 test/controller_extensions/pseudo_role_test.rb
acl9-2.1.2 test/controller_extensions/pseudo_role_test.rb
acl9-2.1.1 test/controller_extensions/pseudo_role_test.rb
acl9-2.1.0 test/controller_extensions/pseudo_role_test.rb
acl9-2.0.0 test/controller_extensions/pseudo_role_test.rb
acl9-1.3.0 test/controller_extensions/pseudo_role_test.rb
acl9-1.2.1 test/controller_extensions/pseudo_role_test.rb
acl9-1.2.0 test/controller_extensions/pseudo_role_test.rb
acl9-1.1.0 test/controller_extensions/pseudo_role_test.rb
acl9-1.0.0 test/controller_extensions/pseudo_role_test.rb