aboutsummaryrefslogtreecommitdiffstats
path: root/tests/header.rs
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2025-02-06 04:18:20 +0000
committerSven-Hendrik Haase <svenstaro@gmail.com>2025-02-06 04:18:20 +0000
commit57f02a1587555176f1b43b001e7846ac9eb2e949 (patch)
tree6585f2d404ae55506f4e25985ce663cea7092788 /tests/header.rs
parentGet rid of server_no_stderr (diff)
downloadminiserve-57f02a1587555176f1b43b001e7846ac9eb2e949.tar.gz
miniserve-57f02a1587555176f1b43b001e7846ac9eb2e949.zip
Clean up and modernize rstest usage
We still had some old-style syntax in there.
Diffstat (limited to 'tests/header.rs')
-rw-r--r--tests/header.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/header.rs b/tests/header.rs
index ea4c462..443f2ba 100644
--- a/tests/header.rs
+++ b/tests/header.rs
@@ -4,11 +4,10 @@ mod fixtures;
use crate::fixtures::{server, Error};
-#[rstest(headers,
- case(vec!["x-info: 123".to_string()]),
- case(vec!["x-info1: 123".to_string(), "x-info2: 345".to_string()])
-)]
-fn custom_header_set(headers: Vec<String>) -> Result<(), Error> {
+#[rstest]
+#[case(vec!["x-info: 123".to_string()])]
+#[case(vec!["x-info1: 123".to_string(), "x-info2: 345".to_string()])]
+fn custom_header_set(#[case] headers: Vec<String>) -> Result<(), Error> {
let server = server(headers.iter().flat_map(|h| vec!["--header", h]));
let resp = reqwest::blocking::get(server.url())?;