ord_server.assert_response_regex(
format!("/inscription/{inscription}"),
format!(
r".*
Inscription 0
.*address\s*bc1qcqgs2pps4u4yedfyl5pysdjjncs8et5utseepv.*location\s*{txid}:0:0.*",
),
)
}
#[test]
fn inscription_content() {
let rpc_server = test_bitcoincore_rpc::spawn();
create_wallet(&rpc_server);
rpc_server.mine_blocks(1);
let (inscription, _) = inscribe(&rpc_server);
rpc_server.mine_blocks(1);
let response =
TestServer::spawn_with_args(&rpc_server, &[]).request(format!("/content/{inscription}"));
assert_eq!(response.status(), StatusCode::OK);
assert_eq!(
response.headers().get("content-type").unwrap(),
"text/plain;charset=utf-8"
);
assert_eq!(
response
.headers()
.get_all("content-security-policy")
.into_iter()
.collect::>(),
&[
"default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob:",
"default-src *:*/content/ *:*/blockheight *:*/blockhash *:*/blockhash/ *:*/blocktime *:*/r/ 'unsafe-eval' 'unsafe-inline' data: blob:",