Skip to content

Commit

Permalink
test(deriv_passkeys): added mock data passkeysRegisterResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
bassam-deriv committed Mar 20, 2024
1 parent df67b57 commit d3c836a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/services/connection/api_manager/mock_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import 'package:flutter_deriv_api/services/connection/api_manager/exceptions/api
import 'package:flutter_deriv_api/services/connection/api_manager/mock_data/account/new_account_wallet_response.dart';
import 'package:flutter_deriv_api/services/connection/api_manager/mock_data/cashier/cashier_payments_response.dart';
import 'package:flutter_deriv_api/services/connection/api_manager/mock_data/passkeys/passkeys_register_options_response.dart';
import 'package:flutter_deriv_api/services/connection/api_manager/mock_data/passkeys/passkeys_register_response.dart';
import 'package:flutter_deriv_api/services/connection/call_manager/base_call_manager.dart';
import 'package:flutter_deriv_api/services/connection/call_manager/exceptions/call_manager_exception.dart';

Expand Down Expand Up @@ -378,6 +379,8 @@ class MockAPI extends BaseAPI {
return walletMigrationResponse;
case 'passkeys_register_options':
return passkeysRegisterOptionsResponse;
case 'passkeys_register':
return passkeysRegisterResponse;

default:
throw APIManagerException(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/// Wallet migration response mock data.
const String passkeysRegisterResponse = '''{
"echo_req": {
"passkeys_register": 1
},
"msg_type": "passkeys_register",
"passkeys_register": {
"properties": {
"created_at": 10000,
"id": "id",
"last_used": 10000,
"name": "Passkey",
"passkey_id": "passkeyId",
"stored_on": "storedOn",
}
}
}''';

0 comments on commit d3c836a

Please sign in to comment.