From 4dc634655edac54e9638e8390d89a96e235522c0 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Fri, 10 Jan 2025 17:23:00 +0100 Subject: Reorganize imports to be more consistent --- tests/header.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/header.rs') diff --git a/tests/header.rs b/tests/header.rs index 4ac38b1..ea4c462 100644 --- a/tests/header.rs +++ b/tests/header.rs @@ -1,7 +1,8 @@ +use rstest::rstest; + mod fixtures; -use fixtures::{server, Error}; -use rstest::rstest; +use crate::fixtures::{server, Error}; #[rstest(headers, case(vec!["x-info: 123".to_string()]), -- cgit v1.2.3 From 57f02a1587555176f1b43b001e7846ac9eb2e949 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Thu, 6 Feb 2025 05:18:20 +0100 Subject: Clean up and modernize rstest usage We still had some old-style syntax in there. --- tests/header.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tests/header.rs') 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) -> 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) -> Result<(), Error> { let server = server(headers.iter().flat_map(|h| vec!["--header", h])); let resp = reqwest::blocking::get(server.url())?; -- cgit v1.2.3