Skip to content

Commit

Permalink
TEST: more tests of HTTP GET schema
Browse files Browse the repository at this point in the history
  • Loading branch information
slivingston committed Nov 1, 2024
1 parent 7643e36 commit 836e3bc
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/bin/rrhttp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,28 @@ rules:
query: None,
};
assert!(config.is_valid(&req));

req.query = Some(HashMap::new());
if let Some(q) = &mut req.query {
q.insert("Base64".to_string(), Some("true".into()));
}
assert!(config.is_valid(&req));

if let Some(q) = &mut req.query {
q.insert("Width".to_string(), Some("800".into()));
q.insert("Height".to_string(), Some("600".into()));
}
assert!(config.is_valid(&req));

if let Some(q) = &mut req.query {
q.insert("Height".to_string(), Some("700".into()));
}
assert!(!config.is_valid(&req));

if let Some(q) = &mut req.query {
q.insert("Height".to_string(), Some("7.7".into()));
}
assert!(!config.is_valid(&req));
}

#[test]
Expand Down

0 comments on commit 836e3bc

Please sign in to comment.