more games information, games route (#756)

* more games information, games route

* adds banner url
This commit is contained in:
Wyatt Verchere
2023-11-14 10:01:31 -08:00
committed by GitHub
parent 375f992a0c
commit f4880d0519
19 changed files with 206 additions and 45 deletions

23
tests/games.rs Normal file
View File

@@ -0,0 +1,23 @@
// TODO: fold this into loader_fields.rs or tags.rs of other v3 testing PR
use crate::common::environment::TestEnvironment;
mod common;
#[actix_rt::test]
async fn get_games() {
let test_env = TestEnvironment::build(None).await;
let api = &test_env.v3;
let games = api.get_games_deserialized().await;
// There should be 2 games in the dummy data
assert_eq!(games.len(), 2);
assert_eq!(games[0].name, "minecraft-java");
assert_eq!(games[1].name, "minecraft-bedrock");
assert_eq!(games[0].slug, "minecraft-java");
assert_eq!(games[1].slug, "minecraft-bedrock");
test_env.cleanup().await;
}