refactor (core <-> ui <-> persistence) with the new filter changes.
Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user