-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes broken getAccount() on device auth
- Loading branch information
1 parent
61e604c
commit 0ea7542
Showing
2 changed files
with
38 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import 'package:faker/faker.dart'; | ||
import 'package:nakama/api/api.pb.dart' as api; | ||
import 'package:nakama/nakama.dart'; | ||
import 'package:nakama/src/nakama_client/nakama_api_client.dart'; | ||
import 'package:test/scaffolding.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
void main() { | ||
group('[REST] Test Account', () { | ||
late final NakamaBaseClient client; | ||
late final Session session; | ||
|
||
setUpAll(() async { | ||
client = NakamaRestApiClient.init( | ||
host: '127.0.0.1', | ||
ssl: false, | ||
serverKey: 'defaultkey', | ||
); | ||
|
||
session = await client.authenticateDevice(deviceId: faker.guid.guid()); | ||
}); | ||
|
||
test('fetching my account', () async { | ||
final account = await client.getAccount(session); | ||
|
||
expect(account, isA<api.Account>()); | ||
}); | ||
}); | ||
} |