[Lists] Add test for sending error

This commit is contained in:
Christian Pauly 2019-06-26 16:37:49 +02:00
parent 41d8b91f87
commit 96bc9b6aca
1 changed files with 11 additions and 0 deletions

View File

@ -125,5 +125,16 @@ void main() {
expect(timeline.events[0].id, "42");
expect(timeline.events[0].status, 2);
});
test("Send message with error", () async {
room.sendTextEvent("test", txid: "errortxid");
await new Future.delayed(new Duration(milliseconds: 50));
expect(updateCount, 7);
expect(insertList, [0, 0, 0, 0]);
expect(timeline.events[0].content["txid"], "errortxid");
expect(timeline.events[0].status, -1);
});
});
}