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 {
|
test('getToDeviceEventQueue', () async {
|
||||||
final toDeviceQueue = await database.getToDeviceEventQueue(clientId);
|
final toDeviceQueue = await database.getToDeviceEventQueue(clientId);
|
||||||
expect(toDeviceQueue.single.type, 'm.test');
|
expect(toDeviceQueue.first.type, 'm.test');
|
||||||
});
|
});
|
||||||
test('deleteFromToDeviceQueue', () async {
|
test('deleteFromToDeviceQueue', () async {
|
||||||
await database.deleteFromToDeviceQueue(clientId, toDeviceQueueIndex);
|
await database.deleteFromToDeviceQueue(clientId, toDeviceQueueIndex);
|
||||||
|
|
@ -68,7 +68,7 @@ void testDatabase(Future<DatabaseApi> futureDatabase, int clientId) {
|
||||||
test('storeFile', () async {
|
test('storeFile', () async {
|
||||||
await database.storeFile('mxc://test', Uint8List.fromList([0]), 0);
|
await database.storeFile('mxc://test', Uint8List.fromList([0]), 0);
|
||||||
final file = await database.getFile('mxc://test');
|
final file = await database.getFile('mxc://test');
|
||||||
expect(file != null, true);
|
expect(file != null, database.supportsFileStoring);
|
||||||
});
|
});
|
||||||
test('getFile', () async {
|
test('getFile', () async {
|
||||||
await database.getFile('mxc://test');
|
await database.getFile('mxc://test');
|
||||||
|
|
@ -150,7 +150,7 @@ void testDatabase(Future<DatabaseApi> futureDatabase, int clientId) {
|
||||||
await database.getAccountData(clientId);
|
await database.getAccountData(clientId);
|
||||||
});
|
});
|
||||||
test('storeAccountData', () async {
|
test('storeAccountData', () async {
|
||||||
await database.storeAccountData(clientId, 'm.test', '{}');
|
await database.storeAccountData(clientId, 'm.test', '{"foo":"bar"}');
|
||||||
final events = await database.getAccountData(clientId);
|
final events = await database.getAccountData(clientId);
|
||||||
expect(events.values.single.type, 'm.test');
|
expect(events.values.single.type, 'm.test');
|
||||||
});
|
});
|
||||||
|
|
@ -215,7 +215,7 @@ void testDatabase(Future<DatabaseApi> futureDatabase, int clientId) {
|
||||||
test('getInboundGroupSessionsToUpload', () async {
|
test('getInboundGroupSessionsToUpload', () async {
|
||||||
await database.getInboundGroupSessionsToUpload();
|
await database.getInboundGroupSessionsToUpload();
|
||||||
});
|
});
|
||||||
test('getInboundGroupSessionsToUpload', () async {
|
test('storeInboundGroupSession', () async {
|
||||||
await database.storeInboundGroupSession(
|
await database.storeInboundGroupSession(
|
||||||
clientId,
|
clientId,
|
||||||
'!testroom:example.com',
|
'!testroom:example.com',
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ void main() {
|
||||||
content: {
|
content: {
|
||||||
'type': 'm.room.message',
|
'type': 'm.room.message',
|
||||||
'origin_server_ts': 100,
|
'origin_server_ts': 100,
|
||||||
'content': {'blah': 'blubb'},
|
'content': <String, dynamic>{'blah': 'blubb'},
|
||||||
'event_id': '\$event-1',
|
'event_id': '\$event-1',
|
||||||
'sender': '@blah:blubb',
|
'sender': '@blah:blubb',
|
||||||
},
|
},
|
||||||
|
|
@ -65,7 +65,7 @@ void main() {
|
||||||
content: {
|
content: {
|
||||||
'type': 'm.room.message',
|
'type': 'm.room.message',
|
||||||
'origin_server_ts': 100,
|
'origin_server_ts': 100,
|
||||||
'content': {'blah': 'blubb'},
|
'content': <String, dynamic>{'blah': 'blubb'},
|
||||||
'event_id': 'transaction-1',
|
'event_id': 'transaction-1',
|
||||||
'sender': '@blah:blubb',
|
'sender': '@blah:blubb',
|
||||||
'status': 0,
|
'status': 0,
|
||||||
|
|
@ -81,10 +81,10 @@ void main() {
|
||||||
content: {
|
content: {
|
||||||
'type': 'm.room.message',
|
'type': 'm.room.message',
|
||||||
'origin_server_ts': 100,
|
'origin_server_ts': 100,
|
||||||
'content': {'blah': 'blubb'},
|
'content': <String, dynamic>{'blah': 'blubb'},
|
||||||
'event_id': '\$event-2',
|
'event_id': '\$event-2',
|
||||||
'sender': '@blah:blubb',
|
'sender': '@blah:blubb',
|
||||||
'unsigned': {
|
'unsigned': <String, dynamic>{
|
||||||
'transaction_id': 'transaction-1',
|
'transaction_id': 'transaction-1',
|
||||||
},
|
},
|
||||||
'status': 1,
|
'status': 1,
|
||||||
|
|
@ -123,7 +123,7 @@ void main() {
|
||||||
'event_id': '\$event-3',
|
'event_id': '\$event-3',
|
||||||
'sender': '@blah:blubb',
|
'sender': '@blah:blubb',
|
||||||
'status': 1,
|
'status': 1,
|
||||||
'unsigned': {
|
'unsigned': <String, dynamic>{
|
||||||
'transaction_id': 'transaction-2',
|
'transaction_id': 'transaction-2',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -163,7 +163,7 @@ void main() {
|
||||||
'event_id': '\$event-4',
|
'event_id': '\$event-4',
|
||||||
'sender': '@blah:blubb',
|
'sender': '@blah:blubb',
|
||||||
'status': 1,
|
'status': 1,
|
||||||
'unsigned': {
|
'unsigned': <String, dynamic>{
|
||||||
'transaction_id': 'transaction-3',
|
'transaction_id': 'transaction-3',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue