forked from eatvio/eatvio_app
fix: test fixed
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:eatvio_app/core/app_config.dart';
|
|||||||
import 'package:eatvio_app/core/app_initializer.dart';
|
import 'package:eatvio_app/core/app_initializer.dart';
|
||||||
import 'package:eatvio_app/core/locator_service.dart';
|
import 'package:eatvio_app/core/locator_service.dart';
|
||||||
import 'package:eatvio_app/core/theme/theme_helper.dart';
|
import 'package:eatvio_app/core/theme/theme_helper.dart';
|
||||||
|
import 'package:eatvio_app/core/websockets/ws_manager.dart';
|
||||||
import 'package:eatvio_app/features/chat/models/chat_message_model.dart';
|
import 'package:eatvio_app/features/chat/models/chat_message_model.dart';
|
||||||
import 'package:eatvio_app/features/chat/models/chat_room_model.dart';
|
import 'package:eatvio_app/features/chat/models/chat_room_model.dart';
|
||||||
import 'package:eatvio_app/features/chat/models/chat_room_settings_model.dart';
|
import 'package:eatvio_app/features/chat/models/chat_room_settings_model.dart';
|
||||||
@@ -37,6 +38,7 @@ void main() {
|
|||||||
setUp(() async {
|
setUp(() async {
|
||||||
await sl.reset();
|
await sl.reset();
|
||||||
sl.registerLazySingleton<AppConfig>(() => AppConfig(buildType: AppBuildType.tests)..setBaseUrl('http://localhost'));
|
sl.registerLazySingleton<AppConfig>(() => AppConfig(buildType: AppBuildType.tests)..setBaseUrl('http://localhost'));
|
||||||
|
sl.registerLazySingleton<WsManager>(() => _FakeWsManager());
|
||||||
});
|
});
|
||||||
|
|
||||||
const fakeSvg = '''
|
const fakeSvg = '''
|
||||||
@@ -174,6 +176,11 @@ void main() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class _FakeWsManager extends Fake implements WsManager {
|
||||||
|
@override
|
||||||
|
int? userId = 1;
|
||||||
|
}
|
||||||
|
|
||||||
class _FakeAssetBundle extends CachingAssetBundle {
|
class _FakeAssetBundle extends CachingAssetBundle {
|
||||||
_FakeAssetBundle(this.assets);
|
_FakeAssetBundle(this.assets);
|
||||||
final Map<String, String> assets;
|
final Map<String, String> assets;
|
||||||
|
|||||||
Reference in New Issue
Block a user