Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 07a6332

Browse files
Added test for Client::block (#12590)
1 parent 7035139 commit 07a6332

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • client/service/test/src/client

client/service/test/src/client/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,14 @@ fn finality_notifications_content() {
11281128
assert!(finality_notifications.try_next().is_err());
11291129
}
11301130

1131+
#[test]
1132+
fn get_block_by_bad_block_hash_returns_none() {
1133+
let client = substrate_test_runtime_client::new();
1134+
1135+
let hash = H256::from_low_u64_be(5);
1136+
assert!(client.block(&BlockId::Hash(hash)).unwrap().is_none());
1137+
}
1138+
11311139
#[test]
11321140
fn get_header_by_block_number_doesnt_panic() {
11331141
let client = substrate_test_runtime_client::new();

0 commit comments

Comments
 (0)