Files
AstralRinth/apps/labrinth/tests/games.rs
Josiah Glosson 62de07e4e6 Version updates (#3626)
* Update some Labrinth dependencies

* Update some Labrinth dependencies

* Update some Labrinth dependencies

* Update zip in Labrinth

* Update itertools in Labrinth

* Update validator in labrinth

* Update thiserror in labrinth

* Update rust_decimal, redis, and deadpool-redis in labrinth

* Update totp-rs and spdx in labrinth

* Update maxminddb and tar in labrinth

* Update sentry and sentry-actix in labrinth

* Update image in labrinth

* Update lettre in labrinth

* Update derive-new and rust_iso3166 in labrinth

* Update async-stripe and json-patch in labrinth

* Update clap and iana-time-zone in labrinth

* Update labrinth to Rust 2024

* Cargo fmt

* Just do a full cargo update

* Update daedelus to Rust 2024

* Update daedelus_client to Rust 2024

* Set the formatting edition to 2024

* Fix formatting

IntelliJ messed up my formatting
2025-05-09 12:27:55 +00:00

30 lines
784 B
Rust

// TODO: fold this into loader_fields.rs or tags.rs of other v3 testing PR
use common::{
api_v3::ApiV3,
environment::{TestEnvironment, with_test_environment},
};
mod common;
#[actix_rt::test]
async fn get_games() {
with_test_environment(
None,
|test_env: TestEnvironment<ApiV3>| async move {
let api = test_env.api;
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");
},
)
.await;
}