mirror of
https://github.com/redlib-org/redlib.git
synced 2025-04-23 23:39:15 +00:00
Add test for popular globalization
This commit is contained in:
parent
b43ed01958
commit
42902cc8d0
1 changed files with 6 additions and 0 deletions
|
@ -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),
|
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());
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue