mod utils;
use TheMovieDB::discover::Discover;
use std::collections::HashMap;
#[tokio::test]
async fn test_discover_movie() {
unsafe { std::env::set_var("TMDB_API_KEY", "dummy_api_key"); }
let discover = Discover::new();
let mut options = HashMap::new();
options.insert("with_genres".to_string(), "28".to_string());
let result = discover.movie(Some(options)).await;
assert!(result.is_err());
unsafe { std::env::remove_var("TMDB_API_KEY"); }
}
#[tokio::test]
async fn test_discover_tv() {
unsafe { std::env::set_var("TMDB_API_KEY", "dummy_api_key"); }
let discover = Discover::new();
let mut options = HashMap::new();
options.insert("with_genres".to_string(), "10759".to_string());
let result = discover.tv(Some(options)).await;
assert!(result.is_err());
unsafe { std::env::remove_var("TMDB_API_KEY"); }
}