()
| 673 | |
| 674 | #[test] |
| 675 | fn test_delegation_expiry() { |
| 676 | let (user, agent) = create_test_identities(); |
| 677 | let scope = DelegationScope::read_only(); |
| 678 | |
| 679 | let delegation = Delegation::new(&user, &agent, scope) |
| 680 | .unwrap() |
| 681 | .expires_in(Duration::hours(1)); |
| 682 | |
| 683 | assert!(delegation.is_valid()); |
| 684 | assert!(!delegation.is_expired()); |
| 685 | } |
| 686 | |
| 687 | #[test] |
| 688 | fn test_delegation_revoke() { |
nothing calls this directly
no test coverage detected