()
| 82 | |
| 83 | #[test] |
| 84 | fn test_role_assignment_parser() { |
| 85 | let values = [ |
| 86 | ( |
| 87 | "project: $rust_project", |
| 88 | Role { |
| 89 | role: Some("project".to_string()), |
| 90 | entity: "rust_project".to_string(), |
| 91 | }, |
| 92 | ), |
| 93 | ( |
| 94 | "assignee: $rust_dev", |
| 95 | Role { |
| 96 | role: Some("assignee".to_string()), |
| 97 | entity: "rust_dev".to_string(), |
| 98 | }, |
| 99 | ), |
| 100 | ( |
| 101 | "$person1", |
| 102 | Role { |
| 103 | role: None, |
| 104 | entity: "person1".to_string(), |
| 105 | }, |
| 106 | ), |
| 107 | ]; |
| 108 | |
| 109 | for (source, expected) in values { |
| 110 | let (_, parsed) = parse_role(source).unwrap(); |
| 111 | |
| 112 | assert_eq!(parsed, expected); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | #[test] |
| 117 | fn test_role_assignments_parser() { |
nothing calls this directly
no test coverage detected