mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Fix test
This commit is contained in:
@@ -77,15 +77,8 @@ void main() {
|
||||
};
|
||||
|
||||
final mockBase = MockWgerBaseProvider();
|
||||
when(mockBase.fetchPaginated(any)).thenAnswer((_) async => [progressionJson]);
|
||||
when(
|
||||
mockBase.makeUrl(
|
||||
any,
|
||||
id: anyNamed('id'),
|
||||
objectMethod: anyNamed('objectMethod'),
|
||||
query: anyNamed('query'),
|
||||
),
|
||||
).thenReturn(Uri.parse('https://example.org/user_progressions'));
|
||||
when(mockBase.fetch(any)).thenAnswer((_) async => [progressionJson]);
|
||||
when(mockBase.makeUrl(any)).thenReturn(Uri.parse('https://example.org/user_progressions'));
|
||||
final repository = TrophyRepository(mockBase);
|
||||
|
||||
// Act
|
||||
@@ -100,7 +93,7 @@ void main() {
|
||||
expect(p.currentValue, 12.5);
|
||||
expect(p.progressDisplay, '12.5/100');
|
||||
|
||||
verify(mockBase.fetchPaginated(any)).called(1);
|
||||
verify(mockBase.fetch(any)).called(1);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user