diff options
| author | Gus Power <gus@infinitesidequests.com> | 2025-05-22 16:21:05 +0100 |
|---|---|---|
| committer | Gus Power <gus@infinitesidequests.com> | 2025-05-22 16:21:05 +0100 |
| commit | 3e5aa28345bb009c12b5a55f2e7174957bf4ed9a (patch) | |
| tree | fa9044d9e72e213aed22d1761a2bf01a439a0550 /src/test_macros.rs | |
| parent | e417f3afd13fa770a3b64d604bb1686ed6a77203 (diff) | |
started on arbitrary http endpoint configuration
Diffstat (limited to 'src/test_macros.rs')
| -rw-r--r-- | src/test_macros.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test_macros.rs b/src/test_macros.rs index e1998cd..7887647 100644 --- a/src/test_macros.rs +++ b/src/test_macros.rs @@ -84,3 +84,14 @@ macro_rules! assert_invalid_response { }); }; } + +#[macro_export] +macro_rules! assert_invalid_http_header { + ($result:expr, $reason_prefix:expr) => { + assert_error!($result, AppError::InvalidHttpHeader(reason) => { + assert!(reason.starts_with($reason_prefix), + "Expected reason to start with '{}', but got '{}'", + $reason_prefix, reason); + }); + }; +} |
