()
| 747 | |
| 748 | #[test] |
| 749 | fn test_delegation_scope_builder() { |
| 750 | let scope = DelegationScope::builder() |
| 751 | .permission(DelegationPermission::Read) |
| 752 | .permission(DelegationPermission::Record) |
| 753 | .repository_pattern("project/*") |
| 754 | .view_pattern("main") |
| 755 | .view_pattern("feature-*") |
| 756 | .max_changes(100) |
| 757 | .description("Limited access for testing") |
| 758 | .build(); |
| 759 | |
| 760 | assert!(scope.has_permission(DelegationPermission::Read)); |
| 761 | assert!(scope.has_permission(DelegationPermission::Record)); |
| 762 | assert_eq!(scope.repository_patterns.len(), 1); |
| 763 | assert_eq!(scope.view_patterns.len(), 2); |
| 764 | assert_eq!(scope.max_changes, Some(100)); |
| 765 | assert!(scope.description.is_some()); |
| 766 | } |
| 767 | |
| 768 | #[test] |
| 769 | fn test_delegation_ci_cd_scope() { |
nothing calls this directly
no test coverage detected