()
| 568 | |
| 569 | #[test] |
| 570 | fn test_verification_result() { |
| 571 | let valid = VerificationResult::Valid { |
| 572 | signer_id: Identity::generate("test").id, |
| 573 | signed_at: Utc::now(), |
| 574 | }; |
| 575 | assert!(valid.is_valid()); |
| 576 | assert!(valid.to_result().is_ok()); |
| 577 | |
| 578 | let invalid = VerificationResult::Invalid { |
| 579 | reason: "Bad signature".to_string(), |
| 580 | }; |
| 581 | assert!(invalid.is_invalid()); |
| 582 | assert!(invalid.to_result().is_err()); |
| 583 | |
| 584 | let not_signed = VerificationResult::NotSigned; |
| 585 | assert!(not_signed.is_not_signed()); |
| 586 | assert!(not_signed.to_result().is_err()); |
| 587 | } |
| 588 | |
| 589 | #[test] |
| 590 | fn test_signature_json_roundtrip() { |
nothing calls this directly
no outgoing calls
no test coverage detected