chore: optimize --render-try-index

This commit is contained in:
sigoden
2022-06-17 19:02:13 +08:00
parent 68d238d34d
commit af866aaaf4
4 changed files with 22 additions and 9 deletions

View File

@@ -39,6 +39,17 @@ fn render_try_index2(#[with(&["--render-try-index"])] server: TestServer) -> Res
Ok(())
}
#[rstest]
fn render_try_index3(#[with(&["--render-try-index"])] server: TestServer) -> Result<(), Error> {
let resp = reqwest::blocking::get(format!("{}{}?zip", server.url(), DIR_NO_INDEX))?;
assert_eq!(resp.status(), 200);
assert_eq!(
resp.headers().get("content-type").unwrap(),
"application/zip"
);
Ok(())
}
#[rstest]
fn render_spa(#[with(&["--render-spa"])] server: TestServer) -> Result<(), Error> {
let resp = reqwest::blocking::get(server.url())?;