Live Activities, nudging, unit tests

This commit is contained in:
2026-04-20 11:11:24 +02:00
parent 3858500a45
commit 7e25a4f978
15 changed files with 348 additions and 20 deletions
@@ -32,14 +32,14 @@ struct MAPlayerDecodingTests {
#expect(player.available == true)
}
@Test("Defaults powered and available when missing")
@Test("powered defaults to false when missing; available defaults to true when missing")
func defaultsMissingBooleans() throws {
let json = """
{"player_id": "x", "name": "Test", "state": "idle"}
"""
let player = try decode(json)
#expect(player.powered == false)
#expect(player.available == false)
#expect(player.available == true)
}
@Test("Unknown state falls back to idle")