use crate::ncaa::query;
use crate::ncaa::pbp::PlayByPlay;

use super::common::TEST_GAME_IDS;


#[tokio::test]
async fn test_query_play_by_play() -> Result<(), reqwest::Error>  {
    // Football
    let mut response: PlayByPlay;
    for id in &TEST_GAME_IDS {
        response = query::play_by_play(&id).await?;
        assert_eq!(response.meta.title.is_empty(), false);
        assert_eq!(response.periods[0].period_number, Some("1".to_string()));
        assert_eq!(response.periods[1].period_number, Some("2".to_string()));
    }

    Ok(())
}