mirror of
https://github.com/hanskokx/arcane_framework.git
synced 2026-05-14 02:19:08 +02:00
Add configuration files and update authentication service error handling
- Introduced .vscode/settings.json and .vscode/launch.json for IDE configuration. - Updated DebugAuthInterface and ArcaneAuthenticationService to return const Result.ok() for consistency. - Added ArcaneTheme class for theme management. - Updated pubspec.yaml to change result_monad dependency version. - Modified authentication_service_test to return const Result.ok() in mock setups. Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -23,10 +23,10 @@ void main() {
|
||||
|
||||
// Set up default mock behaviors
|
||||
when(mockInterface.login(input: anyNamed("input"))).thenAnswer(
|
||||
(_) async => Result.ok(null),
|
||||
(_) async => const Result.ok(null),
|
||||
);
|
||||
when(mockInterface.logout()).thenAnswer(
|
||||
(_) async => Result.ok(null),
|
||||
(_) async => const Result.ok(null),
|
||||
);
|
||||
when(mockInterface.init()).thenAnswer(
|
||||
(_) async {},
|
||||
@@ -61,7 +61,7 @@ void main() {
|
||||
testWidgets("login with failure", (WidgetTester tester) async {
|
||||
// Reset the mock behavior for this specific test
|
||||
when(mockInterface.login(input: anyNamed("input")))
|
||||
.thenAnswer((_) async => Result.error("error"));
|
||||
.thenAnswer((_) async => const Result.error("error"));
|
||||
|
||||
final result = await ArcaneAuthenticationService.I
|
||||
.login(input: {"username": "test"});
|
||||
|
||||
Reference in New Issue
Block a user