forked from eatvio/eatvio_app
Merge remote-tracking branch 'upstream/main' into personalized_feed
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
import 'package:eatvio_app/core/app_config.dart';
|
||||
import 'package:eatvio_app/core/app_initializer.dart';
|
||||
import 'package:eatvio_app/core/env_config.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:eatvio_app/core/locator_service.dart';
|
||||
import 'package:eatvio_app/features/video_calls/presentation/bloc/video_call_session/video_call_session_cubit.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:mockito/mockito.dart';
|
||||
|
||||
class _MockVideoCallSessionCubit extends Mock implements VideoCallSessionCubit {}
|
||||
|
||||
void main() {
|
||||
setUpAll(() async {
|
||||
@@ -11,6 +16,17 @@ void main() {
|
||||
dotenv.loadFromString(envString: 'DEV_BASE_URL=http://localhost\nBASE_URL=http://localhost');
|
||||
});
|
||||
|
||||
setUp(() async {
|
||||
await sl.reset();
|
||||
sl.registerLazySingleton<VideoCallSessionCubit>(
|
||||
_MockVideoCallSessionCubit.new,
|
||||
);
|
||||
});
|
||||
|
||||
tearDown(() async {
|
||||
await sl.reset();
|
||||
});
|
||||
|
||||
group('AppConfig', () {
|
||||
test('creates config with prod build type', () {
|
||||
final config = AppConfig(buildType: AppBuildType.prod);
|
||||
|
||||
@@ -33,6 +33,7 @@ void main() {
|
||||
expect(newMessagesChannelName, 'private-new-chat-messages');
|
||||
expect(newNotificationsChannelName, 'private-message-events');
|
||||
expect(directChatChannelName, 'private-direct-chat');
|
||||
expect(presenceDirectChatChannelName, 'presence-direct-chat');
|
||||
});
|
||||
|
||||
test('thresholdForPagination has correct value', () {
|
||||
|
||||
@@ -32,6 +32,7 @@ void main() {
|
||||
DioExceptionType.connectionTimeout,
|
||||
DioExceptionType.sendTimeout,
|
||||
DioExceptionType.receiveTimeout,
|
||||
DioExceptionType.transformTimeout,
|
||||
]) {
|
||||
final e = DioException(
|
||||
requestOptions: RequestOptions(path: '/x'),
|
||||
|
||||
Reference in New Issue
Block a user