File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -340,6 +340,27 @@ void main() {
340340 );
341341 });
342342
343+ test ('login with identityRequest' , () async {
344+ TestDefaultBinaryMessengerBinding .instance.defaultBinaryMessenger
345+ .setMockMethodCallHandler (
346+ channel,
347+ (MethodCall call) async {
348+ methodCall = call;
349+ return '{"mpid": "123"}' ;
350+ },
351+ );
352+ IdentityRequest request = IdentityRequest ()
353+ ..setIdentity (
354+ identityType: IdentityType .Email , value: 'login@example.com' );
355+ await mp.identity.login (identityRequest: request);
356+ expect (
357+ methodCall,
358+ isMethodCall ('login' , arguments: {
359+ 'identityRequest' : {7 : 'login@example.com' }
360+ }),
361+ );
362+ });
363+
343364 test ('login without identityRequest sends empty map' , () async {
344365 TestDefaultBinaryMessengerBinding .instance.defaultBinaryMessenger
345366 .setMockMethodCallHandler (
You can’t perform that action at this time.
0 commit comments