()
| 894 | |
| 895 | #[test] |
| 896 | fn revocation_round_trips() { |
| 897 | let (alice, _claude, doc) = certificate(); |
| 898 | let parsed = verify(&doc, &alice.identity.public_key).unwrap(); |
| 899 | |
| 900 | let revocation = mint_revocation( |
| 901 | &alice.identity, |
| 902 | &alice.keypair, |
| 903 | &parsed.id, |
| 904 | Some("laptop lost"), |
| 905 | ); |
| 906 | let checked = verify_revocation(&revocation, &alice.identity.public_key).unwrap(); |
| 907 | |
| 908 | assert_eq!(checked.delegation, parsed.id.to_urn()); |
| 909 | assert_eq!(checked.reason.as_deref(), Some("laptop lost")); |
| 910 | } |
| 911 | |
| 912 | #[test] |
| 913 | fn only_the_delegator_can_revoke() { |
nothing calls this directly
no test coverage detected