MCPcopy Create free account
hub / github.com/Migorithm/rustiful-backend / test_get_board

Function test_get_board

tests/repository.rs:42–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40
41 #[tokio::test]
42 async fn test_get_board() {
43 run_test(async {
44 let (context_manager, _) = ContextManager::new().await;
45 let executor = context_manager.read().await.executor();
46
47 let mut board_repo = board_repository_helper(executor.clone());
48 let id: String;
49
50 '_tranasction_block: {
51 executor.write().await.begin().await.unwrap();
52
53 let mut board_aggregate = board_create_helper(BoardState::Unpublished);
54
55 id = board_repo.add(&mut board_aggregate).await.unwrap();
56 executor.write().await.commit().await.unwrap();
57 }
58
59 '_test_block: {
60 let _board_aggregate = board_repo.get(&id).await.unwrap();
61 }
62 })
63 .await;
64 }
65
66 #[tokio::test]
67 async fn test_get_board_with_different_state() {

Callers

nothing calls this directly

Calls 8

board_repository_helperFunction · 0.85
board_create_helperFunction · 0.85
run_testFunction · 0.70
executorMethod · 0.45
beginMethod · 0.45
addMethod · 0.45
commitMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected