-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Many things have broken without me noticing because of a few broken tests.
- Loading branch information
Showing
1 changed file
with
7 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ import 'package:flutter_test/flutter_test.dart'; | |
import 'package:http_mock_adapter/http_mock_adapter.dart'; | ||
import 'package:pretty_dio_logger/pretty_dio_logger.dart'; | ||
import 'package:waydowntown/refresh_token_interceptor.dart'; | ||
import 'package:waydowntown/services/user_service.dart'; | ||
import 'package:waydowntown/widgets/session_widget.dart'; | ||
|
||
void main() { | ||
|
@@ -73,6 +74,7 @@ void main() { | |
'http://example.com/fixme/session', | ||
(server) => server.reply(200, { | ||
'data': { | ||
'id': '1', | ||
'attributes': {'email': '[email protected]', 'admin': true} | ||
} | ||
}), | ||
|
@@ -92,6 +94,8 @@ void main() { | |
expect(await secureStorage.read(key: 'user_email'), | ||
equals('[email protected]')); | ||
expect(await secureStorage.read(key: 'user_is_admin'), equals('true')); | ||
|
||
expect(await UserService.getUserId(), equals('1')); | ||
}); | ||
|
||
testWidgets( | ||
|
@@ -105,6 +109,7 @@ void main() { | |
'http://example.com/fixme/session', | ||
(server) => server.reply(200, { | ||
'data': { | ||
'id': '1', | ||
'attributes': {'email': '[email protected]', 'admin': false} | ||
} | ||
}), | ||
|
@@ -136,6 +141,7 @@ void main() { | |
'http://example.com/fixme/session', | ||
(server) => server.reply(200, { | ||
'data': { | ||
'id': '1', | ||
'attributes': {'email': '[email protected]'} | ||
} | ||
}), | ||
|
@@ -207,6 +213,7 @@ void main() { | |
'http://example.com/fixme/session', | ||
(server) => server.reply(200, { | ||
'data': { | ||
'id': '1', | ||
'attributes': {'email': '[email protected]'} | ||
} | ||
}), | ||
|