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

Function test_delegation_new

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

Source from the content-addressed store, hash-verified

661
662 #[test]
663 fn test_delegation_new() {
664 let (user, agent) = create_test_identities();
665 let scope = DelegationScope::read_only();
666
667 let delegation = Delegation::new(&user, &agent, scope).unwrap();
668
669 assert_eq!(delegation.delegator_id, user.id);
670 assert_eq!(delegation.delegate_id, agent.id);
671 assert!(delegation.is_valid());
672 }
673
674 #[test]
675 fn test_delegation_expiry() {

Callers

nothing calls this directly

Calls 2

create_test_identitiesFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected