Skip to content

Commit

Permalink
Add first test
Browse files Browse the repository at this point in the history
  • Loading branch information
Spone committed Sep 12, 2024
1 parent 641069c commit 600efcd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/action_policy/authorizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def initialize(policy, rule)
@rule = rule
@result = policy.result

super("Not authorized: #{@policy}##{@rule}? returns false")
super("Not authorized: #{@policy}##{@rule} returns false")
end
end

Expand Down
1 change: 1 addition & 0 deletions test/action_policy/behaviour_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def test_authorize_failed

assert_equal UserPolicy, e.policy
assert_equal :manage?, e.rule
assert_equal "Not authorized: UserPolicy#manage? returns false", e.message
end

def test_allowed_to
Expand Down

0 comments on commit 600efcd

Please sign in to comment.