MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / trigger_on_multiple_events

Function trigger_on_multiple_events

nodedb/tests/event_trigger.rs:608–622  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

606
607#[test]
608fn trigger_on_multiple_events() {
609 let reg = TriggerRegistry::new();
610 reg.register(make_trigger(
611 "all_events",
612 "orders",
613 true,
614 true,
615 true,
616 TriggerExecutionMode::Async,
617 ));
618
619 assert_eq!(reg.get_matching(1, "orders", DmlEvent::Insert).len(), 1);
620 assert_eq!(reg.get_matching(1, "orders", DmlEvent::Update).len(), 1);
621 assert_eq!(reg.get_matching(1, "orders", DmlEvent::Delete).len(), 1);
622}
623
624// ---------------------------------------------------------------------------
625// Trigger list for tenant

Callers

nothing calls this directly

Calls 2

make_triggerFunction · 0.70
registerMethod · 0.45

Tested by

no test coverage detected