()
| 1284 | #[tokio::test] |
| 1285 | #[should_panic(expected = "error getting open vote")] |
| 1286 | async fn check_vote_error_getting_vote() { |
| 1287 | let mut db = MockDB::new(); |
| 1288 | db.expect_get_open_vote() |
| 1289 | .with(eq(REPOFN), eq(ISSUE_NUM)) |
| 1290 | .times(1) |
| 1291 | .returning(|_, _| Box::pin(future::ready(Err(format_err!(ERROR))))); |
| 1292 | let gh = MockGH::new(); |
| 1293 | |
| 1294 | let (_, cmds_rx) = async_channel::unbounded(); |
| 1295 | let event = setup_test_pr_event(); |
| 1296 | let cmds_handler = CommandsHandler::new(Arc::new(db), Arc::new(gh), cmds_rx); |
| 1297 | cmds_handler.check_vote(&CheckVoteInput::new(&Event::PullRequest(event))).await.unwrap(); |
| 1298 | } |
| 1299 | |
| 1300 | #[tokio::test] |
| 1301 | async fn check_vote_not_found() { |
nothing calls this directly
no test coverage detected