forked from eatvio/eatvio_app
37 lines
1.2 KiB
Dart
37 lines
1.2 KiB
Dart
import 'package:eatvio_app/generated/l10n.dart';
|
|
import 'package:eatvio_app/old/auth/auth_screen/auth_screen.dart';
|
|
import 'package:eatvio_app/old/auth/auth_screen/bloc/auth_bloc.dart';
|
|
import 'package:eatvio_app/old/auth/auth_screen/models/auth_model.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
void main() {
|
|
group('AuthScreen', () {
|
|
testWidgets('renders AuthScreen with initial state', (WidgetTester tester) async {
|
|
final authBloc = AuthBloc(AuthState(authModelObj: AuthModel()));
|
|
|
|
await tester.pumpWidget(
|
|
MaterialApp(
|
|
localizationsDelegates: const [
|
|
S.delegate,
|
|
GlobalMaterialLocalizations.delegate,
|
|
GlobalWidgetsLocalizations.delegate,
|
|
GlobalCupertinoLocalizations.delegate,
|
|
],
|
|
supportedLocales: S.delegate.supportedLocales,
|
|
home: BlocProvider<AuthBloc>(
|
|
create: (context) => authBloc,
|
|
child: Builder(
|
|
builder: (context) {
|
|
return AuthScreen();
|
|
},
|
|
),
|
|
),
|
|
),
|
|
);
|
|
});
|
|
});
|
|
}
|