diff options
Diffstat (limited to 'server/test/net/app_test.dart')
| -rw-r--r-- | server/test/net/app_test.dart | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server/test/net/app_test.dart b/server/test/net/app_test.dart index 4a02c15..a37a8e5 100644 --- a/server/test/net/app_test.dart +++ b/server/test/net/app_test.dart @@ -42,6 +42,15 @@ void main() { expect(jsonDecode(body), {'status': 'ok'}); }); + test('serves the game data JSON at /data/', () async { + final body = await httpGet( + server.httpUrl.replace(path: '/data/editions/editions.json'), + ); + final decoded = jsonDecode(body) as Map<String, dynamic>; + expect(decoded['editions'], isA<List>()); + expect(decoded['editions'], contains('Jaws of the Lion')); + }); + test('session endpoint mints a session and sets the cookie', () async { final client = HttpClient(); addTearDown(client.close); |
