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

Function test_delegation_expiry

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

Source from the content-addressed store, hash-verified

673
674 #[test]
675 fn test_delegation_expiry() {
676 let (user, agent) = create_test_identities();
677 let scope = DelegationScope::read_only();
678
679 let delegation = Delegation::new(&user, &agent, scope)
680 .unwrap()
681 .expires_in(Duration::hours(1));
682
683 assert!(delegation.is_valid());
684 assert!(!delegation.is_expired());
685 }
686
687 #[test]
688 fn test_delegation_revoke() {

Callers

nothing calls this directly

Calls 3

create_test_identitiesFunction · 0.85
expires_inMethod · 0.80
unwrapMethod · 0.45

Tested by

no test coverage detected