()
| 793 | |
| 794 | #[test] |
| 795 | fn test_scope_builder() { |
| 796 | let scope = DelegationScope::builder() |
| 797 | .permission(DelegationPermission::Read) |
| 798 | .permission(DelegationPermission::Record) |
| 799 | .server("https://atomic.storage") |
| 800 | .project("acme/*") |
| 801 | .view("main") |
| 802 | .max_changes(100) |
| 803 | .build(); |
| 804 | |
| 805 | assert!(scope.has_permission(DelegationPermission::Read)); |
| 806 | assert!(scope.has_permission(DelegationPermission::Record)); |
| 807 | assert!(!scope.has_permission(DelegationPermission::Push)); |
| 808 | assert_eq!(scope.max_changes, Some(100)); |
| 809 | } |
| 810 | |
| 811 | #[test] |
| 812 | fn test_scope_empty_dimension_is_unrestricted() { |
nothing calls this directly
no test coverage detected