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

Added test for Client::block #12590

Merged
merged 1 commit into from
Oct 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions client/service/test/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down