diff --git a/test/authentication_test.dart b/test/authentication_test.dart index 7ea505969..ce4e3a472 100644 --- a/test/authentication_test.dart +++ b/test/authentication_test.dart @@ -69,6 +69,8 @@ void main() { .thenAnswer((realInvocation) => Future.value(true)); when(mockWebsiteProvider.fetchWebsites(any)) .thenAnswer((_) => Future.value([])); + when(mockWebsiteProvider.fetchFavouriteWebsites()) + .thenAnswer((_) => Future.value(null)); mockFilterProvider = MockFilterProvider(); // ignore: invalid_use_of_protected_member diff --git a/test/integration_test.dart b/test/integration_test.dart index caee2d4e7..cbb55cf80 100644 --- a/test/integration_test.dart +++ b/test/integration_test.dart @@ -219,6 +219,8 @@ void main() { isPrivate: false, ), ])); + when(mockWebsiteProvider.fetchFavouriteWebsites()).thenAnswer( + (_) async => (await mockWebsiteProvider.fetchWebsites(any)).take(3)); mockFilterProvider = MockFilterProvider(); // ignore: invalid_use_of_protected_member diff --git a/test/portal_test.dart b/test/portal_test.dart index 551b44896..74d9a2c89 100644 --- a/test/portal_test.dart +++ b/test/portal_test.dart @@ -59,6 +59,8 @@ void main() { isPrivate: false, ), ])); + when(mockWebsiteProvider.fetchFavouriteWebsites()).thenAnswer( + (_) async => (await mockWebsiteProvider.fetchWebsites(any)).take(3)); final FilterProvider mockFilterProvider = MockFilterProvider(); // ignore: invalid_use_of_protected_member diff --git a/test/settings_test.dart b/test/settings_test.dart index 44379072b..9fea7ae6b 100644 --- a/test/settings_test.dart +++ b/test/settings_test.dart @@ -6,10 +6,10 @@ import 'package:acs_upb_mobile/pages/faq/service/question_provider.dart'; import 'package:acs_upb_mobile/pages/news_feed/model/news_feed_item.dart'; import 'package:acs_upb_mobile/pages/news_feed/service/news_provider.dart'; import 'package:acs_upb_mobile/pages/portal/service/website_provider.dart'; -import 'package:acs_upb_mobile/resources/locale_provider.dart'; import 'package:acs_upb_mobile/pages/settings/service/request_provider.dart'; import 'package:acs_upb_mobile/pages/settings/view/request_permissions.dart'; import 'package:acs_upb_mobile/pages/settings/view/settings_page.dart'; +import 'package:acs_upb_mobile/resources/locale_provider.dart'; import 'package:acs_upb_mobile/widgets/dialog.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -65,6 +65,8 @@ void main() { .thenAnswer((realInvocation) => Future.value(true)); when(mockWebsiteProvider.fetchWebsites(any)) .thenAnswer((_) => Future.value([])); + when(mockWebsiteProvider.fetchFavouriteWebsites()) + .thenAnswer((_) => Future.value(null)); mockQuestionProvider = MockQuestionProvider(); // ignore: invalid_use_of_protected_member