Fix guild info balance decoding

This commit is contained in:
Claude committed 2026-09-30 18:06:59 +00:00
1 parent badb5fccc0
commit c4a222451c
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -77,7 +77,8 @@ async fn plugins_read_players_and_change_progress() {
t.call("POST", "/api/v1/friends/respond", Some(&tokens[1]), Some(json!({"target_uuid": steve, "accept": true}))).await;
let (_, f) = call("player/friends", json!({"uuid": steve})).await;
assert_eq!((f["friends"][0]["name"].as_str(), f["friends"][0]["uuid"].as_str()), (Some("Alex"), Some(alex.as_str())));
let (_, gi) = call("guild/info", json!({"guild": "iron"})).await;
let (gs, gi) = call("guild/info", json!({"guild": "iron"})).await;
assert_eq!(gs, StatusCode::OK, "{gi}");
assert_eq!((gi["exists"].clone(), gi["name"].as_str(), gi["members"][0]["name"].as_str()), (json!(true), Some("Iron"), Some("Steve")));
let (_, by_member) = call("guild/info", json!({"member": steve})).await;
assert_eq!(by_member["id"], g["id"]);