refactor (core <-> ui <-> persistence) with the new filter changes.

Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
Sahil Kumar
2021-04-27 15:41:00 +05:30
parent f683961581
commit 8c666caa52
24 changed files with 180 additions and 195 deletions
@@ -17,11 +17,7 @@ void main() {
});
test('updateChannelQueries', () async {
const filter = {
'members': {
r'$in': ['testUserId'],
},
};
final filter = Filter.in_('members', const ['testUserId']);
const cids = ['testCid1', 'testCid2', 'testCid3'];
@@ -36,11 +32,7 @@ void main() {
});
test('clear queryCache before updateChannelQueries', () async {
const filter = {
'members': {
r'$in': ['testUserId'],
},
};
final filter = Filter.in_('members', const ['testUserId']);
const cids = ['testCid1', 'testCid2', 'testCid3'];
@@ -59,11 +51,7 @@ void main() {
});
test('getCachedChannelCids', () async {
const filter = {
'members': {
r'$in': ['testUserId'],
},
};
final filter = Filter.in_('members', const ['testUserId']);
const cids = ['testCid1', 'testCid2', 'testCid3'];
@@ -78,7 +66,7 @@ void main() {
});
Future<List<ChannelModel>> _insertTestDataForGetChannel(
Map<String, Object> filter, {
Filter filter, {
int count = 3,
}) async {
final now = DateTime.now();
@@ -110,11 +98,7 @@ void main() {
}
group('getChannels', () {
const filter = {
'members': {
r'$in': ['testUserId'],
},
};
final filter = Filter.in_('members', const ['testUserId']);
test('should return empty list of channels', () async {
final channels = await channelQueryDao.getChannels(filter: filter);