diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/common/factory_bot.rs | 6 | ||||
| -rw-r--r-- | tests/integration_tests.rs | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/tests/common/factory_bot.rs b/tests/common/factory_bot.rs index a16a1213..f25633f4 100644 --- a/tests/common/factory_bot.rs +++ b/tests/common/factory_bot.rs @@ -42,12 +42,6 @@ pub fn build_headers(headers: Vec<(String, String)>) -> HashMap<String, String> }); } -pub fn create_headers_with_auth(auth_value: &str) -> HashMap<String, String> { - return build_with(|item: &mut HashMap<String, String>| { - item.insert(String::from("authorization"), String::from(auth_value)); - }); -} - pub fn create_token() -> String { return String::from("valid-token"); } diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 41c3bf29..c25d1920 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -39,7 +39,10 @@ async fn test_multiple() { ]; for (auth_value, should_succeed) in test_cases { - let headers = common::factory_bot::create_headers_with_auth(auth_value); + let headers = common::factory_bot::build_headers(vec![( + "authorization".to_string(), + auth_value.to_string(), + )]); let request = common::factory_bot::create_test_request_with_headers(headers); let response = server.check(request).await; |
