diff options
Diffstat (limited to 'server/test')
| -rw-r--r-- | server/test/net/settings_test.dart | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/server/test/net/settings_test.dart b/server/test/net/settings_test.dart index 677af11..900039b 100644 --- a/server/test/net/settings_test.dart +++ b/server/test/net/settings_test.dart @@ -97,8 +97,8 @@ void main() { final aliceGot = await table.alice.nextOf('settings'); final bobGot = await table.bob.nextOf('settings'); - expect(aliceGot['settings']['hideLootDeck'], isTrue); - expect(bobGot['settings']['hideLootDeck'], isTrue); + expect((aliceGot['settings'] as Map)['hideLootDeck'], isTrue); + expect((bobGot['settings'] as Map)['hideLootDeck'], isTrue); expect(getIt<Settings>().hideLootDeck, isTrue); // A reconnecting client sees it in the welcome too. @@ -335,7 +335,7 @@ void main() { table.alice.send(Protocol.saveMessage('alpha')); final saved = await table.alice.nextOf('settings'); - expect(saved['settings']['saves'], ['alpha']); + expect((saved['settings'] as Map)['saves'], ['alpha']); expect(getIt<Settings>().saves.keys, contains('alpha')); // Change the state: add a monster (index 2). @@ -377,7 +377,7 @@ void main() { // Delete the save; loading it after is rejected. table.alice.send(Protocol.deleteSaveMessage('alpha')); final deleted = await table.alice.nextOf('settings'); - expect(deleted['settings']['saves'], isEmpty); + expect((deleted['settings'] as Map)['saves'], isEmpty); expect(getIt<Settings>().saves.keys, isEmpty); table.alice.send(Protocol.loadSaveMessage('alpha')); @@ -402,7 +402,7 @@ void main() { // No error: deleting an unknown save is a silent no-op (the // reference's deleteSave just removes from the map). final settings = await table.alice.nextOf('settings'); - expect(settings['settings']['saves'], isEmpty); + expect((settings['settings'] as Map)['saves'], isEmpty); } finally { await table.teardown(); } @@ -419,7 +419,7 @@ void main() { Protocol.saveCharacterMessage('Blinky backup', 'Blinkblade'), ); final saved = await table.alice.nextOf('settings'); - final characterSaves = saved['settings']['characterSaves'] as List; + final characterSaves = (saved['settings'] as Map)['characterSaves'] as List; expect( characterSaves, [{ @@ -452,7 +452,7 @@ void main() { Protocol.deleteCharacterSaveMessage('Blinky backup\nBlinkblade'), ); final deleted = await table.alice.nextOf('settings'); - expect(deleted['settings']['characterSaves'], isEmpty); + expect((deleted['settings'] as Map)['characterSaves'], isEmpty); table.alice.send( Protocol.loadCharacterSaveMessage('Blinky backup\nBlinkblade'), |
