); } #[test] fn inscription_with_known_type_and_no_body_has_unknown_preview() { let server = TestServer::new_with_regtest_with_index_sats(); server.mine_blocks(1); let txid = server.bitcoin_rpc_server.broadcast_tx(TransactionTemplate { inputs: &[( 1, 0, 0, Inscription::new(Some("image/png".as_bytes().to_vec()), None).to_witness(), )], ..Default::default() }); let inscription_id = InscriptionId { txid, index: 0 }; server.mine_blocks(1); server.assert_response( format!("/preview/{inscription_id}"), StatusCode::OK, &fs::read_to_string("templates/preview-unknown.html").unwrap(), ); } #[test] fn content_responses_have_cache_control_headers() { let server = TestServer::new_with_regtest(); server.mine_blocks(1); let txid = server.bitcoin_rpc_server.broadcast_tx(TransactionTemplate { inputs: &[(1, 0, 0, inscription("text/foo", "hello").to_witness())], ..Default::default()