Use max pagination size when loading data

This is a workaround for #867, but not a real solution
This commit is contained in:
Roland Geider
2025-09-06 00:50:00 +02:00
parent 4330e51f86
commit c89ccb630c
8 changed files with 44 additions and 27 deletions

View File

@@ -54,11 +54,12 @@ void main() {
});
group('test the workout routine provider', () {
test('Test fetching and setting a plan', () async {
test('Test fetching and setting a routine', () async {
final exercisesProvider = ExercisesProvider(mockBaseProvider);
final uri = Uri.https('localhost', 'api/v2/routine/325397/');
when(mockBaseProvider.makeUrl('routine', id: 325397)).thenReturn(uri);
when(mockBaseProvider.makeUrl('routine', id: 325397, query: {'limit': API_MAX_PAGE_SIZE}))
.thenReturn(uri);
when(mockBaseProvider.fetch(uri)).thenAnswer(
(_) async => Future.value({
'id': 325397,