MCPcopy Create free account
hub / github.com/cosdata/cosdata / test_role_assignment_parser

Function test_role_assignment_parser

src/cosql/pattern/relationship.rs:84–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 1

parse_roleFunction · 0.85

Tested by

no test coverage detected