forked from eatvio/eatvio_app
test(session): cover avatar refresh and session teardown
Add regression tests for avatar reset and token-change refresh, stale 401 handling, idempotent session teardown and account-scoped preference cleanup. Update existing cubit tests for the new session dependency. Refs: #1113
This commit is contained in:
@@ -6,6 +6,7 @@ import 'package:eatvio_app/features/settings/presentation/bloc/settings_cubit/se
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import '../../../../fixtures/doubles/session_doubles.dart';
|
||||
import '../../../../fixtures/settings_fixtures.dart';
|
||||
import '../bloc/settings_cubit_test.mocks.dart';
|
||||
|
||||
@@ -27,6 +28,7 @@ void main() {
|
||||
settingsRepository: mockSettingsRepository,
|
||||
consultantRepository: mockConsultantRepository,
|
||||
consultationsRepository: mockConsultationsRepository,
|
||||
sessionLifecycleService: FakeSessionLifecycleService(),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:mockito/annotations.dart';
|
||||
import 'package:mockito/mockito.dart';
|
||||
|
||||
import '../../../../fixtures/doubles/session_doubles.dart';
|
||||
import 'settings_screen_smoke_test.mocks.dart';
|
||||
|
||||
@GenerateNiceMocks([
|
||||
@@ -57,6 +58,7 @@ void main() {
|
||||
settingsRepository: sl(),
|
||||
consultantRepository: sl(),
|
||||
consultationsRepository: sl(),
|
||||
sessionLifecycleService: FakeSessionLifecycleService(),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user