()
| 280 | |
| 281 | #[test] |
| 282 | fn registry_matches_instead_of_triggers() { |
| 283 | let reg = TriggerRegistry::new(); |
| 284 | reg.register(make_instead_of_trigger( |
| 285 | "redirect_insert", |
| 286 | "view_orders", |
| 287 | DmlEvent::Insert, |
| 288 | )); |
| 289 | |
| 290 | let matched = reg.get_matching(1, "view_orders", DmlEvent::Insert); |
| 291 | assert_eq!(matched.len(), 1); |
| 292 | assert_eq!(matched[0].timing, TriggerTiming::InsteadOf); |
| 293 | } |
| 294 | |
| 295 | #[test] |
| 296 | fn instead_of_does_not_match_wrong_event() { |
nothing calls this directly
no test coverage detected