()
| 661 | |
| 662 | #[test] |
| 663 | fn test_delegation_new() { |
| 664 | let (user, agent) = create_test_identities(); |
| 665 | let scope = DelegationScope::read_only(); |
| 666 | |
| 667 | let delegation = Delegation::new(&user, &agent, scope).unwrap(); |
| 668 | |
| 669 | assert_eq!(delegation.delegator_id, user.id); |
| 670 | assert_eq!(delegation.delegate_id, agent.id); |
| 671 | assert!(delegation.is_valid()); |
| 672 | } |
| 673 | |
| 674 | #[test] |
| 675 | fn test_delegation_expiry() { |
nothing calls this directly
no test coverage detected