(ack: integration_pb::AckEvent)
| 195 | } |
| 196 | |
| 197 | pub fn ack_event(ack: integration_pb::AckEvent) -> Validator { |
| 198 | Box::new(move || { |
| 199 | let ack = ack.clone(); |
| 200 | Box::pin(async move { |
| 201 | // Integration events are handled async. |
| 202 | sleep(Duration::from_millis(100)).await; |
| 203 | |
| 204 | let mut mock_events = mock::get_ack_events().await; |
| 205 | assert_eq!(1, mock_events.len()); |
| 206 | |
| 207 | assert_ne!("", mock_events[0].deduplication_id); |
| 208 | assert_ne!(None, mock_events[0].time); |
| 209 | |
| 210 | mock_events[0].deduplication_id = "".into(); |
| 211 | mock_events[0].time = None; |
| 212 | assert_eq!(ack, mock_events[0]); |
| 213 | }) |
| 214 | }) |
| 215 | } |
| 216 | |
| 217 | pub fn status_event(st: integration_pb::StatusEvent) -> Validator { |
| 218 | Box::new(move || { |
no test coverage detected