Skip to content

Commit

Permalink
Add test for isNextPageLoading when pull to refresh is performed
Browse files Browse the repository at this point in the history
  • Loading branch information
PVGeorgievPrime committed Feb 14, 2024
1 parent 14dbccf commit febf33b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/rx_bloc_list/test/paginated_list_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ void main() {
expect(list.isNextPageLoading, equals(false));
});

test('Next page not loading when perform pull to refresh', () {
final list = PaginatedList(
list: emptyListData,
pageSize: pageSize,
isLoading: true,
);
list.reset();
expect(list.isNextPageLoading, equals(false));
});

test('Next page loading when there is data', () {
final list = PaginatedList(
list: List.generate(listSize, (index) => index),
Expand Down

0 comments on commit febf33b

Please sign in to comment.