fix coverage
This commit is contained in:
parent
8358dec3a5
commit
f065a92445
|
@ -91,5 +91,9 @@ void main() {
|
|||
expect(decryptedEvent.content['msgtype'], 'm.text');
|
||||
expect(decryptedEvent.content['text'], 'Hello foxies!');
|
||||
});
|
||||
|
||||
test('dispose client', () async {
|
||||
await client.dispose(closeDatabase: true);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -111,5 +111,10 @@ void main() {
|
|||
expect(decryptedEvent.type, 'm.to_device');
|
||||
expect(decryptedEvent.content['hello'], 'superfoxies');
|
||||
});
|
||||
|
||||
test('dispose client', () async {
|
||||
await client.dispose(closeDatabase: true);
|
||||
await otherClient.dispose(closeDatabase: true);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -215,5 +215,9 @@ void main() {
|
|||
null,
|
||||
true);
|
||||
});
|
||||
|
||||
test('dispose client', () async {
|
||||
await client.dispose(closeDatabase: true);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -99,5 +99,9 @@ void main() {
|
|||
expect(verified, true);
|
||||
keyVerification?.dispose();
|
||||
});
|
||||
|
||||
test('dispose client', () async {
|
||||
await client.dispose(closeDatabase: true);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -108,5 +108,9 @@ void main() {
|
|||
.containsKey(client.identityKey),
|
||||
true);
|
||||
});
|
||||
|
||||
test('dispose client', () async {
|
||||
await client.dispose(closeDatabase: true);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -330,13 +330,13 @@ void main() {
|
|||
final dynamic resp = await room.sendEvent(
|
||||
{'msgtype': 'm.text', 'body': 'hello world'},
|
||||
txid: 'testtxid');
|
||||
expect(resp, '\$event0');
|
||||
expect(resp.startsWith('\$event'), true);
|
||||
});
|
||||
|
||||
test('sendEvent', () async {
|
||||
final dynamic resp =
|
||||
await room.sendTextEvent('Hello world', txid: 'testtxid');
|
||||
expect(resp, '\$event1');
|
||||
expect(resp.startsWith('\$event'), true);
|
||||
});
|
||||
|
||||
// Not working because there is no real file to test it...
|
||||
|
|
|
@ -143,7 +143,8 @@ void main() {
|
|||
expect(updateCount, 5);
|
||||
expect(insertList, [0, 0, 0]);
|
||||
expect(insertList.length, timeline.events.length);
|
||||
expect(timeline.events[0].eventId, '\$event0');
|
||||
final eventId = timeline.events[0].eventId;
|
||||
expect(eventId.startsWith('\$event'), true);
|
||||
expect(timeline.events[0].status, 1);
|
||||
|
||||
client.onEvent.add(EventUpdate(
|
||||
|
@ -155,7 +156,7 @@ void main() {
|
|||
'content': {'msgtype': 'm.text', 'body': 'test'},
|
||||
'sender': '@alice:example.com',
|
||||
'status': 2,
|
||||
'event_id': '\$event0',
|
||||
'event_id': eventId,
|
||||
'unsigned': {'transaction_id': '1234'},
|
||||
'origin_server_ts': DateTime.now().millisecondsSinceEpoch
|
||||
},
|
||||
|
@ -166,7 +167,7 @@ void main() {
|
|||
expect(updateCount, 6);
|
||||
expect(insertList, [0, 0, 0]);
|
||||
expect(insertList.length, timeline.events.length);
|
||||
expect(timeline.events[0].eventId, '\$event0');
|
||||
expect(timeline.events[0].eventId, eventId);
|
||||
expect(timeline.events[0].status, 2);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue