}); let inscription_id = InscriptionId { txid, index: 0 }; server.mine_blocks(1); server.assert_response_regex( format!("/preview/{inscription_id}"), StatusCode::OK, format!(r".*.*"), ); } #[test] fn content_response_no_content_type() { let (headers, body) = Server::content_response( Inscription::new(None, Some(Vec::new())), AcceptEncoding::default(), &PageConfig::default(), ) .unwrap() .unwrap(); assert_eq!(headers["content-type"], "application/octet-stream"); assert!(body.is_empty()); } #[test] fn content_response_bad_content_type() { let (headers, body) = Server::content_response( Inscription::new(Some("\n".as_bytes().to_vec()), Some(Vec::new())), AcceptEncoding::default(), &PageConfig::default(), ) .unwrap() .unwrap(); assert_eq!(headers["content-type"], "application/octet-stream"); assert!(body.is_empty());