From 42902cc8d029c854d3f33aa5202c7cc809e90c2a Mon Sep 17 00:00:00 2001 From: Matthew Esposito Date: Thu, 28 Dec 2023 10:40:17 -0500 Subject: [PATCH] Add test for popular globalization --- src/client.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/client.rs b/src/client.rs index 451893d..6cda26c 100644 --- a/src/client.rs +++ b/src/client.rs @@ -331,3 +331,9 @@ pub async fn json(path: String, quarantine: bool) -> Result { Err(e) => err("Couldn't send request to Reddit", e), } } + +#[tokio::test(flavor = "multi_thread", worker_threads = 1)] +async fn test_localization_popular() { + let val = json("/r/popular/hot.json?&raw_json=1&geo_filter=GLOBAL".to_string(), false).await.unwrap(); + assert_eq!("GLOBAL", val["data"]["geo_filter"].as_str().unwrap()); +}