Skip to content

Commit ccacce0

Browse files
committed
Add basic unit test for keys
In preparation for modifying the `keys` function add a basic unit test.
1 parent 48bdf5e commit ccacce0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/policy/concrete.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,4 +1242,14 @@ mod tests {
12421242

12431243
assert_eq!(got, want);
12441244
}
1245+
1246+
#[test]
1247+
fn keys() {
1248+
let policy = Policy::<String>::from_str("or(and(pk(A),pk(B)),pk(C))").unwrap();
1249+
1250+
let want = vec!["A", "B", "C"];
1251+
let got = policy.keys();
1252+
1253+
assert_eq!(got, want);
1254+
}
12451255
}

0 commit comments

Comments
 (0)