MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_delegation_revoke

Function test_delegation_revoke

atomic-identity/src/delegation.rs:688–699  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

686
687 #[test]
688 fn test_delegation_revoke() {
689 let (user, agent) = create_test_identities();
690 let scope = DelegationScope::read_only();
691
692 let mut delegation = Delegation::new(&user, &agent, scope).unwrap();
693 assert!(delegation.is_valid());
694
695 delegation.revoke();
696 assert!(!delegation.is_valid());
697 assert!(delegation.revoked);
698 assert!(delegation.revoked_at.is_some());
699 }
700
701 #[test]
702 fn test_delegation_allows() {

Callers

nothing calls this directly

Calls 3

create_test_identitiesFunction · 0.85
revokeMethod · 0.80
unwrapMethod · 0.45

Tested by

no test coverage detected