From 96bc9b6aca89da9c277573f485420f60289d367b Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Wed, 26 Jun 2019 16:37:49 +0200 Subject: [PATCH] [Lists] Add test for sending error --- test/Timeline_test.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/Timeline_test.dart b/test/Timeline_test.dart index 88f0c52..d30a49b 100644 --- a/test/Timeline_test.dart +++ b/test/Timeline_test.dart @@ -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); + }); }); }