fix: decodeURI searching string (#61)

This commit is contained in:
sigoden
2022-06-20 21:51:41 +08:00
committed by GitHub
parent c85ea06785
commit 069cb64889
2 changed files with 14 additions and 1 deletions

View File

@@ -74,6 +74,18 @@ fn get_dir_search(server: TestServer) -> Result<(), Error> {
Ok(())
}
#[rstest]
fn get_dir_search2(server: TestServer) -> Result<(), Error> {
let resp = reqwest::blocking::get(format!("{}?q={}", server.url(), "😀.data"))?;
assert_eq!(resp.status(), 200);
let paths = utils::retrive_index_paths(&resp.text()?);
assert!(!paths.is_empty());
for p in paths {
assert!(p.contains(&"😀.data"));
}
Ok(())
}
#[rstest]
fn head_dir_search(server: TestServer) -> Result<(), Error> {
let resp = fetch!(b"HEAD", format!("{}?q={}", server.url(), "test.html")).send()?;