Skip to content

Commit

Permalink
Add test for popular globalization
Browse files Browse the repository at this point in the history
  • Loading branch information
sigaloid committed Dec 28, 2023
1 parent b43ed01 commit 42902cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

0 comments on commit 42902cc

Please sign in to comment.