-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
57 additions
and
83 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
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
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
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
19 changes: 0 additions & 19 deletions
19
packages/celest_auth/example/celest/lib/src/client/serializers.dart
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
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
28 changes: 22 additions & 6 deletions
28
packages/celest_auth/example/celest/test/functions/greeting_test.dart
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 |
---|---|---|
@@ -1,18 +1,34 @@ | ||
import 'package:celest_backend/exceptions/bad_name_exception.dart'; | ||
import 'package:celest_backend/models/person.dart'; | ||
import 'package:celest/celest.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
import '../../functions/greeting.dart'; | ||
|
||
void main() { | ||
group('greeting', () { | ||
test('sayHello', () async { | ||
expect(await sayHello(person: Person(name: 'Celest')), 'Hello, Celest!'); | ||
expect( | ||
await sayHello( | ||
user: User( | ||
userId: '123', | ||
email: '[email protected]', | ||
emailVerified: true, | ||
displayName: 'Celest', | ||
), | ||
), | ||
'Hello, Celest!', | ||
); | ||
}); | ||
test('sayHello (empty name)', () async { | ||
test('sayHello (email not verified)', () async { | ||
expect( | ||
sayHello(person: Person(name: '')), | ||
throwsA(isA<BadNameException>()), | ||
sayHello( | ||
user: User( | ||
userId: '123', | ||
email: '[email protected]', | ||
emailVerified: false, | ||
displayName: 'Celest', | ||
), | ||
), | ||
throwsA(isA<UnauthorizedException>()), | ||
); | ||
}); | ||
}); | ||
|
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