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

Function revocation_round_trips

atomic-canonical/src/delegation.rs:931–945  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

929
930 #[test]
931 fn revocation_round_trips() {
932 let (alice, _claude, doc) = certificate();
933 let parsed = verify(&doc, &alice.identity.public_key).unwrap();
934
935 let revocation = mint_revocation(
936 &alice.identity,
937 &alice.keypair,
938 &parsed.id,
939 Some("laptop lost"),
940 );
941 let checked = verify_revocation(&revocation, &alice.identity.public_key).unwrap();
942
943 assert_eq!(checked.delegation, parsed.id.to_urn());
944 assert_eq!(checked.reason.as_deref(), Some("laptop lost"));
945 }
946
947 #[test]
948 fn only_the_delegator_can_revoke() {

Callers

nothing calls this directly

Calls 5

mint_revocationFunction · 0.85
verify_revocationFunction · 0.85
certificateFunction · 0.70
verifyFunction · 0.70
unwrapMethod · 0.45

Tested by

no test coverage detected