Skip to content

Commit

Permalink
Add test case to TestAuthenticateCapability for releasing a cap
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbez committed Mar 27, 2020
1 parent 19a8cb1 commit 24bd82e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x/capability/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ func (suite *KeeperTestSuite) TestAuthenticateCapability() {
suite.Require().False(sk2.AuthenticateCapability(suite.ctx, cap2, "invalid"))
suite.Require().False(sk2.AuthenticateCapability(suite.ctx, cap1, "bond"))

sk2.ReleaseCapability(suite.ctx, cap2)
suite.Require().False(sk2.AuthenticateCapability(suite.ctx, cap2, "bond"))

badCap := types.NewCapabilityKey(100)
suite.Require().False(sk1.AuthenticateCapability(suite.ctx, badCap, "transfer"))
suite.Require().False(sk2.AuthenticateCapability(suite.ctx, badCap, "bond"))
Expand Down

0 comments on commit 24bd82e

Please sign in to comment.