Recieve challange before expecting callback

After commit abfe5b7a37 we expect a
challange before sending the callback to the UI. Fixes tests.
This commit is contained in:
Samuel Mannehed 2017-10-17 12:29:43 +02:00
parent a342ed703f
commit aa5b3a3528
1 changed files with 4 additions and 0 deletions

View File

@ -840,6 +840,10 @@ describe('Remote Frame Buffer Protocol Client', function() {
client.set_onPasswordRequired(sinon.spy());
send_security(2, client);
var challenge = [];
for (var i = 0; i < 16; i++) { challenge[i] = i; }
client._sock._websocket._receive_data(new Uint8Array(challenge));
var spy = client.get_onPasswordRequired();
expect(client._rfb_password.length).to.equal(0);
expect(spy).to.have.been.calledOnce;