message: Fix expiring test
diff: @@ -3,7 +3,7 @@ use chrono::Duration;
  use rspotify::{
  prelude::*, scopes, AuthCodeSpotify, ClientCredsSpotify, Config, Credentials, OAuth, Token,
  };
  -use std::{collections::HashMap, fs, io::Read, path::PathBuf, thread::sleep};
  +use std::{collections::HashMap, fs, io::Read, path::PathBuf};
  use url::Url;
  #[test]
  @@ -112,15 +112,24 @@ async fn test_write_token() {
  #[test]
  fn test_token_is_expired() {
  + let expires_in = Duration::seconds(20);
  let tok = Token {
  scopes: scopes!("playlist-read-private", "playlist-read-collaborative"),
  access_token: "test-access_token".to_owned(),
  - expires_in: Duration::seconds(1),
  - expires_at: Some(Utc::now()),
  + expires_in,
  + expires_at: Some(Utc::now() + expires_in),
  refresh_token: Some("...".to_owned()),
  };
  assert!(!tok.is_expired());
  - sleep(std::time::Duration::from_secs(2));
  +
  + let expires_in = Duration::seconds(3); // There's a margin of 10 seconds
  + let tok = Token {
  + scopes: scopes!("playlist-read-private", "playlist-read-collaborative"),
  + access_token: "test-access_token".to_owned(),
  + expires_in,
  + expires_at: Some(Utc::now() + expires_in),
  + refresh_token: Some("...".to_owned()),
  + };
  assert!(tok.is_expired());
  }
  