Skip to content

Commit

Permalink
Add a policy test
Browse files Browse the repository at this point in the history
  • Loading branch information
martinemde committed Sep 28, 2024
1 parent 800f38f commit 8f476a4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/policies/rubygem_policy_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,12 @@ def policy!(user)
refute_authorized nil, :show_unconfirmed_ownerships?
end
end

context "#show_owner_mfa_status?" do
should "only allow the owner" do
assert_authorized @owner, :show_owner_mfa_status?
refute_authorized @user, :show_owner_mfa_status?
refute_authorized nil, :show_owner_mfa_status?
end
end
end

0 comments on commit 8f476a4

Please sign in to comment.