diff --git a/test/database_api_test.dart b/test/database_api_test.dart index ca47d1ba..f0bce0e8 100644 --- a/test/database_api_test.dart +++ b/test/database_api_test.dart @@ -58,7 +58,7 @@ void testDatabase(Future futureDatabase, int clientId) { }); test('getToDeviceEventQueue', () async { final toDeviceQueue = await database.getToDeviceEventQueue(clientId); - expect(toDeviceQueue.single.type, 'm.test'); + expect(toDeviceQueue.first.type, 'm.test'); }); test('deleteFromToDeviceQueue', () async { await database.deleteFromToDeviceQueue(clientId, toDeviceQueueIndex); @@ -68,7 +68,7 @@ void testDatabase(Future futureDatabase, int clientId) { test('storeFile', () async { await database.storeFile('mxc://test', Uint8List.fromList([0]), 0); final file = await database.getFile('mxc://test'); - expect(file != null, true); + expect(file != null, database.supportsFileStoring); }); test('getFile', () async { await database.getFile('mxc://test'); @@ -150,7 +150,7 @@ void testDatabase(Future futureDatabase, int clientId) { await database.getAccountData(clientId); }); test('storeAccountData', () async { - await database.storeAccountData(clientId, 'm.test', '{}'); + await database.storeAccountData(clientId, 'm.test', '{"foo":"bar"}'); final events = await database.getAccountData(clientId); expect(events.values.single.type, 'm.test'); }); @@ -215,7 +215,7 @@ void testDatabase(Future futureDatabase, int clientId) { test('getInboundGroupSessionsToUpload', () async { await database.getInboundGroupSessionsToUpload(); }); - test('getInboundGroupSessionsToUpload', () async { + test('storeInboundGroupSession', () async { await database.storeInboundGroupSession( clientId, '!testroom:example.com', diff --git a/test/matrix_database_test.dart b/test/matrix_database_test.dart index d7bba5af..fa7150c2 100644 --- a/test/matrix_database_test.dart +++ b/test/matrix_database_test.dart @@ -48,7 +48,7 @@ void main() { content: { 'type': 'm.room.message', 'origin_server_ts': 100, - 'content': {'blah': 'blubb'}, + 'content': {'blah': 'blubb'}, 'event_id': '\$event-1', 'sender': '@blah:blubb', }, @@ -65,7 +65,7 @@ void main() { content: { 'type': 'm.room.message', 'origin_server_ts': 100, - 'content': {'blah': 'blubb'}, + 'content': {'blah': 'blubb'}, 'event_id': 'transaction-1', 'sender': '@blah:blubb', 'status': 0, @@ -81,10 +81,10 @@ void main() { content: { 'type': 'm.room.message', 'origin_server_ts': 100, - 'content': {'blah': 'blubb'}, + 'content': {'blah': 'blubb'}, 'event_id': '\$event-2', 'sender': '@blah:blubb', - 'unsigned': { + 'unsigned': { 'transaction_id': 'transaction-1', }, 'status': 1, @@ -123,7 +123,7 @@ void main() { 'event_id': '\$event-3', 'sender': '@blah:blubb', 'status': 1, - 'unsigned': { + 'unsigned': { 'transaction_id': 'transaction-2', }, }, @@ -163,7 +163,7 @@ void main() { 'event_id': '\$event-4', 'sender': '@blah:blubb', 'status': 1, - 'unsigned': { + 'unsigned': { 'transaction_id': 'transaction-3', }, },