notify router: read custom flows and disabled built-ins from a stored document
This commit is contained in:
parent
03fc548b0a
commit
bb08fac33c
11 changed files with 1418 additions and 342 deletions
|
|
@ -163,6 +163,22 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
/// The names a stored flow may read are the ones `fields` produces.
|
||||
#[test]
|
||||
fn the_fields_are_the_ones_a_stored_flow_may_name() {
|
||||
let d = Delivery::parse(&issue_assign("assigned", &["atlas"])).expect("parses");
|
||||
for event in ["issues", "issue_assign"] {
|
||||
let mut got: Vec<&str> = fields(event, &d, &Snapshot::default())
|
||||
.keys()
|
||||
.copied()
|
||||
.collect();
|
||||
let mut want = swarm_wire::notify_flows::FIELDS.to_vec();
|
||||
got.sort_unstable();
|
||||
want.sort_unstable();
|
||||
assert_eq!(got, want, "{event}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn an_issue_delivery_reads_back_its_fields() {
|
||||
let d = Delivery::parse(&issue_assign("assigned", &["atlas", "iris"])).expect("parses");
|
||||
|
|
|
|||
Loading…
Reference in a new issue