.*
<h2>0 Inscriptions</h2>
<div class=thumbnails>
</div>
<h2>1 Transaction</h2>
<ul class=monospace>
<li><a href=/tx/[[:xdigit:]]{64}>[[:xdigit:]]{64}</a></li>
</ul>
"
.unindent()
);
}
#[test]
fn next_active_when_not_last() {
assert_regex_match!(
BlockHtml::new(
Chain::Mainnet.genesis_block(),
Height(0),
Height(1),
0,
Vec::new()
),
r"<h1>Block 0</h1>.*prev\s*<a class=next href=/block/1>next</a>.*"
);
}
#[test]
fn prev_active_when_not_first() {
assert_regex_match!(
BlockHtml::new(
Chain::Mainnet.genesis_block(),
Height(1),
Height(1),
0,
Vec::new()
),
r"<h1>Block 1</h1>.*<a class=prev href=/block/0>prev</a>\s*next.*",
);
}
#[test]
fn block_hash_serializes_as_hex_string() {
assert_eq!(
serde_json::to_string(&BlockHash::all_zeros()).unwrap(),
"\"0000000000000000000000000000000000000000000000000000000000000000\""