test: Add more header tests

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb 2024-08-11 11:50:39 +00:00
parent 6520ab62e5
commit 0ad044904a
Signed by: awiteb
GPG key ID: 3F6B55640AA6682F

View file

@ -96,6 +96,22 @@ mod tests {
Some(Some("token")), Some(Some("token")),
Some(Some("answer")) Some(Some("answer"))
)] )]
#[case::only_token(
None,
None,
Some(("x-captcha-token", "token")),
None,
Some(Some("token")),
None
)]
#[case::only_answer(
None,
None,
None,
Some(("x-captcha-answer", "answer")),
None,
Some(Some("answer"))
)]
#[case::custom_not_found(Some("custom-token"), Some("custom-answer"), None, None, None, None)] #[case::custom_not_found(Some("custom-token"), Some("custom-answer"), None, None, None, None)]
#[case::custom_not_found_with_headers( #[case::custom_not_found_with_headers(
Some("custom-token"), Some("custom-token"),