()
| 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() { |
nothing calls this directly
no test coverage detected