test(core): fix tests

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2021-09-07 20:20:49 +05:30
committed by xsahil03x
parent d9de5e15ad
commit 3069f87629
3 changed files with 21 additions and 7 deletions
@@ -74,7 +74,10 @@ void main() {
messageFilters: any(named: 'messageFilters'),
paginationParams: any(named: 'paginationParams'),
)).thenAnswer(
(_) async => SearchMessagesResponse()..results = messageResponseList,
(_) async => SearchMessagesResponse()
..results = messageResponseList
..next = null
..previous = null,
);
messageSearchBlocState.search(filter: testFilter);
@@ -177,7 +180,10 @@ void main() {
messageFilters: any(named: 'messageFilters'),
paginationParams: any(named: 'paginationParams'),
)).thenAnswer(
(_) async => SearchMessagesResponse()..results = messageResponseList,
(_) async => SearchMessagesResponse()
..results = messageResponseList
..next = null
..previous = null,
);
messageSearchBlocState.search(filter: testFilter);
@@ -206,8 +212,10 @@ void main() {
messageFilters: any(named: 'messageFilters'),
paginationParams: pagination,
)).thenAnswer(
(_) async =>
SearchMessagesResponse()..results = paginatedMessageResponseList,
(_) async => SearchMessagesResponse()
..results = paginatedMessageResponseList
..next = null
..previous = null,
);
messageSearchBlocState.search(pagination: pagination, filter: testFilter);
@@ -269,7 +277,10 @@ void main() {
messageFilters: any(named: 'messageFilters'),
paginationParams: any(named: 'paginationParams'),
)).thenAnswer(
(_) async => SearchMessagesResponse()..results = messageResponseList,
(_) async => SearchMessagesResponse()
..results = messageResponseList
..next = null
..previous = null,
);
messageSearchBlocState.search(filter: testFilter);