Add test for popular globalization

This commit is contained in:
Matthew Esposito 2023-12-28 10:40:17 -05:00
parent b43ed01958
commit 42902cc8d0
No known key found for this signature in database

View File

@ -331,3 +331,9 @@ pub async fn json(path: String, quarantine: bool) -> Result<Value, String> {
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());
}