Added test for Client::block (#12590)

This commit is contained in:
Michal Kucharczyk
2022-10-31 12:43:36 +01:00
committed by GitHub
parent cb20ae7de1
commit a1a3b923ab
@@ -1128,6 +1128,14 @@ fn finality_notifications_content() {
assert!(finality_notifications.try_next().is_err());
}
#[test]
fn get_block_by_bad_block_hash_returns_none() {
let client = substrate_test_runtime_client::new();
let hash = H256::from_low_u64_be(5);
assert!(client.block(&BlockId::Hash(hash)).unwrap().is_none());
}
#[test]
fn get_header_by_block_number_doesnt_panic() {
let client = substrate_test_runtime_client::new();