From 8b3e2e6c865badf3b976018578fffc8bc4273672 Mon Sep 17 00:00:00 2001 From: Sorunome Date: Tue, 14 Jul 2020 11:46:37 +0200 Subject: [PATCH] fix tests --- test/room_test.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/room_test.dart b/test/room_test.dart index 590f0ec..b459db5 100644 --- a/test/room_test.dart +++ b/test/room_test.dart @@ -300,6 +300,9 @@ void main() { }); test('getParticipants', () async { + var userList = room.getParticipants(); + expect(userList.length, 4); + // add new user room.setState(Event( senderId: '@alice:test.abc', type: 'm.room.member', @@ -309,9 +312,9 @@ void main() { originServerTs: DateTime.now(), content: {'displayname': 'alice'}, stateKey: '@alice:test.abc')); - final userList = room.getParticipants(); - expect(userList.length, 4); - expect(userList[3].displayName, 'alice'); + userList = room.getParticipants(); + expect(userList.length, 5); + expect(userList[4].displayName, 'alice'); }); test('addToDirectChat', () async {