aboutsummaryrefslogtreecommitdiffstats
path: root/tests/qrcode.rs
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2020-07-20 21:54:25 +0000
committerSven-Hendrik Haase <svenstaro@gmail.com>2020-07-20 21:54:25 +0000
commitb17a29472f3c418f097774fc61420a8e54de8ad1 (patch)
treefa4f927f2390a505297ceafd7e29f759bbdba86d /tests/qrcode.rs
parentChange CHANGELOG.md format to keepachangelog.com (diff)
downloadminiserve-b17a29472f3c418f097774fc61420a8e54de8ad1.tar.gz
miniserve-b17a29472f3c418f097774fc61420a8e54de8ad1.zip
cargo fmt
Diffstat (limited to 'tests/qrcode.rs')
-rw-r--r--tests/qrcode.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/qrcode.rs b/tests/qrcode.rs
index b032267..ca98861 100644
--- a/tests/qrcode.rs
+++ b/tests/qrcode.rs
@@ -57,7 +57,6 @@ fn show_qrcode_element(tmpdir: TempDir, port: u16) -> Result<(), Error> {
#[rstest]
fn get_svg_qrcode(tmpdir: TempDir, port: u16) -> Result<(), Error> {
-
let mut child = Command::cargo_bin("miniserve")?
.arg(tmpdir.path())
.arg("-p")
@@ -69,7 +68,7 @@ fn get_svg_qrcode(tmpdir: TempDir, port: u16) -> Result<(), Error> {
// Ok
let resp = reqwest::blocking::get(format!("http://localhost:{}/?qrcode=test", port).as_str())?;
-
+
assert_eq!(resp.status(), StatusCode::OK);
assert_eq!(resp.headers()["Content-Type"], "image/svg+xml");
let body = resp.text()?;
@@ -78,8 +77,9 @@ fn get_svg_qrcode(tmpdir: TempDir, port: u16) -> Result<(), Error> {
// Err
let content: String = repeat_with(|| '0').take(8 * 1024).collect();
- let resp = reqwest::blocking::get(format!("http://localhost:{}/?qrcode={}", port, content).as_str())?;
-
+ let resp =
+ reqwest::blocking::get(format!("http://localhost:{}/?qrcode={}", port, content).as_str())?;
+
assert_eq!(resp.status(), StatusCode::URI_TOO_LONG);
child.kill()?;