Skip to content

Commit 984576c

Browse files
committed
Add basic unit test for keys
In preparation for modifying the `keys` function add a basic unit test.
1 parent 2b11f64 commit 984576c

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
@@ -1222,4 +1222,14 @@ mod tests {
12221222

12231223
assert_eq!(got, want);
12241224
}
1225+
1226+
#[test]
1227+
fn keys() {
1228+
let policy = Policy::<String>::from_str("or(and(pk(A),pk(B)),pk(C))").unwrap();
1229+
1230+
let want = vec!["A", "B", "C"];
1231+
let got = policy.keys();
1232+
1233+
assert_eq!(got, want);
1234+
}
12251235
}

0 commit comments

Comments
 (0)