MCPcopy Create free account
hub / github.com/cncf/gitvote / check_vote_error_getting_vote

Function check_vote_error_getting_vote

src/processor.rs:1286–1298  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 3

setup_test_pr_eventFunction · 0.85
PullRequestClass · 0.85
check_voteMethod · 0.80

Tested by

no test coverage detected