fix: Minor test glitches
This commit is contained in:
parent
c387b33e9f
commit
0e1e72d3ab
|
|
@ -58,7 +58,7 @@ void testDatabase(Future<DatabaseApi> 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<DatabaseApi> 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<DatabaseApi> 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<DatabaseApi> futureDatabase, int clientId) {
|
|||
test('getInboundGroupSessionsToUpload', () async {
|
||||
await database.getInboundGroupSessionsToUpload();
|
||||
});
|
||||
test('getInboundGroupSessionsToUpload', () async {
|
||||
test('storeInboundGroupSession', () async {
|
||||
await database.storeInboundGroupSession(
|
||||
clientId,
|
||||
'!testroom:example.com',
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ void main() {
|
|||
content: {
|
||||
'type': 'm.room.message',
|
||||
'origin_server_ts': 100,
|
||||
'content': {'blah': 'blubb'},
|
||||
'content': <String, dynamic>{'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': <String, dynamic>{'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': <String, dynamic>{'blah': 'blubb'},
|
||||
'event_id': '\$event-2',
|
||||
'sender': '@blah:blubb',
|
||||
'unsigned': {
|
||||
'unsigned': <String, dynamic>{
|
||||
'transaction_id': 'transaction-1',
|
||||
},
|
||||
'status': 1,
|
||||
|
|
@ -123,7 +123,7 @@ void main() {
|
|||
'event_id': '\$event-3',
|
||||
'sender': '@blah:blubb',
|
||||
'status': 1,
|
||||
'unsigned': {
|
||||
'unsigned': <String, dynamic>{
|
||||
'transaction_id': 'transaction-2',
|
||||
},
|
||||
},
|
||||
|
|
@ -163,7 +163,7 @@ void main() {
|
|||
'event_id': '\$event-4',
|
||||
'sender': '@blah:blubb',
|
||||
'status': 1,
|
||||
'unsigned': {
|
||||
'unsigned': <String, dynamic>{
|
||||
'transaction_id': 'transaction-3',
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue