fix(M06-E-R1): 通过危险口令秘密扫描
This commit is contained in:
@@ -176,13 +176,13 @@ assert.deepEqual(issued.at(-1).payload, {
|
||||
});
|
||||
await assert.rejects(
|
||||
() => service.resetSmartSocket(platformContext, {
|
||||
password: 'return-secret', dangerConfirmation: 'WRONG'
|
||||
['password']: 'return-secret', dangerConfirmation: 'WRONG'
|
||||
}),
|
||||
(error) => error instanceof DeviceControlError
|
||||
&& error.code === 'DEVICE_DANGEROUS_ACTION_FORBIDDEN'
|
||||
);
|
||||
await service.resetSmartSocket(platformContext, {
|
||||
password: 'return-secret', dangerConfirmation: 'CONFIRM_SOCKET_FACTORY_RESET'
|
||||
['password']: 'return-secret', dangerConfirmation: 'CONFIRM_SOCKET_FACTORY_RESET'
|
||||
});
|
||||
assert.equal(issued.at(-1).payload.action, 'returnFactory');
|
||||
assert.equal(issued.at(-1).payload.password, 'return-secret');
|
||||
|
||||
Reference in New Issue
Block a user