Skip to content

Commit

Permalink
test: add simuls online test
Browse files Browse the repository at this point in the history
  • Loading branch information
ion232 committed Sep 14, 2024
1 parent 260fd06 commit b66a054
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/online.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ pub async fn daily_puzzle() {
assert!(!response.puzzle.id.is_empty());
}

#[tokio::test(flavor = "current_thread")]
pub async fn simuls() {
let api = make_api(None);
let response = api.get_current_simuls().await.unwrap();
println!("{:?}", response);
assert!(!response.started.first().unwrap().id.is_empty());
}

fn make_api(auth_token: Option<String>) -> LichessApi<reqwest::Client> {
let http: reqwest::Client = reqwest::Client::new();
LichessApi::new(http, auth_token)
Expand Down

0 comments on commit b66a054

Please sign in to comment.