()
| 367 | |
| 368 | #[tokio::test] |
| 369 | async fn sends_a_transaction() { |
| 370 | let (blockchain, _, _) = setup().await; |
| 371 | let to = Account::random(); |
| 372 | let transaction = new_transaction(to, blockchain.clone()).await; |
| 373 | let transaction_hash = blockchain |
| 374 | .lock() |
| 375 | .await |
| 376 | .send_transaction(transaction.into()) |
| 377 | .await |
| 378 | .unwrap(); |
| 379 | |
| 380 | assert_receipt(blockchain.clone(), transaction_hash).await; |
| 381 | |
| 382 | let balance = get_balance(blockchain, &to).await; |
| 383 | assert_eq!(balance, U256::from(10)); |
| 384 | } |
| 385 | |
| 386 | #[tokio::test] |
| 387 | async fn send_a_raw_transaction() { |
nothing calls this directly
no test coverage detected