File tree Expand file tree Collapse file tree
packages/stream_chat_persistence/test/src/dao Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,7 +59,8 @@ void main() {
5959 final insertedUsers = await _prepareUserData ();
6060
6161 // Modifying one of the users and also adding one new
62- final copyUser = insertedUsers.first.copyWith (online: false );
62+ final copyUser =
63+ insertedUsers.first.copyWith (online: ! insertedUsers.first.online);
6364 final newUser = User (
6465 id: 'testUserId3' ,
6566 role: 'testRole' ,
@@ -72,11 +73,14 @@ void main() {
7273 await userDao.updateUsers ([copyUser, newUser]);
7374
7475 // Fetched users length should be one more than inserted users.
75- // copyUser `online` modified field should be `false` .
76+ // copyUser `online` should match the toggled value .
7677 // Fetched users should contain the newUser.
7778 final fetchedUsers = await _readPersistedUsers ();
7879 expect (fetchedUsers.length, insertedUsers.length + 1 );
79- expect (fetchedUsers.firstWhere ((it) => it.id == copyUser.id).online, false );
80+ expect (
81+ fetchedUsers.firstWhere ((it) => it.id == copyUser.id).online,
82+ copyUser.online,
83+ );
8084 expect (fetchedUsers.any ((it) => it.id == newUser.id), isTrue);
8185 });
8286
You can’t perform that action at this time.
0 commit comments