fix tests
This commit is contained in:
parent
4394196ba1
commit
8b3e2e6c86
|
@ -300,6 +300,9 @@ void main() {
|
||||||
});
|
});
|
||||||
|
|
||||||
test('getParticipants', () async {
|
test('getParticipants', () async {
|
||||||
|
var userList = room.getParticipants();
|
||||||
|
expect(userList.length, 4);
|
||||||
|
// add new user
|
||||||
room.setState(Event(
|
room.setState(Event(
|
||||||
senderId: '@alice:test.abc',
|
senderId: '@alice:test.abc',
|
||||||
type: 'm.room.member',
|
type: 'm.room.member',
|
||||||
|
@ -309,9 +312,9 @@ void main() {
|
||||||
originServerTs: DateTime.now(),
|
originServerTs: DateTime.now(),
|
||||||
content: {'displayname': 'alice'},
|
content: {'displayname': 'alice'},
|
||||||
stateKey: '@alice:test.abc'));
|
stateKey: '@alice:test.abc'));
|
||||||
final userList = room.getParticipants();
|
userList = room.getParticipants();
|
||||||
expect(userList.length, 4);
|
expect(userList.length, 5);
|
||||||
expect(userList[3].displayName, 'alice');
|
expect(userList[4].displayName, 'alice');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('addToDirectChat', () async {
|
test('addToDirectChat', () async {
|
||||||
|
|
Loading…
Reference in a new issue