} #[test] fn text_preview() { 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/plain;charset=utf-8", "hello").to_witness(), )], ..Default::default() }); let inscription_id = InscriptionId { txid, index: 0 }; server.mine_blocks(1); server.assert_response_csp( format!("/preview/{}", inscription_id), StatusCode::OK, "default-src 'self'", format!(".*.*", inscription_id), ); } #[test] fn audio_preview() { let server = TestServer::new_with_regtest(); server.mine_blocks(1); let txid = server.bitcoin_rpc_server.broadcast_tx(TransactionTemplate { inputs: &[(1, 0, 0, inscription("audio/flac", "hello").to_witness())], ..Default::default() }); let inscription_id = InscriptionId { txid, index: 0 }; server.mine_blocks(1);