spec/integ/matrix-client-crypto.spec.js
/**
 * Set an expectation that bob will query alis keys; then flush the http request.
 *
 * @return {promise} which resolves once the http request has completed.
 */
Set an expectation that bob will query alis keys; then flush the http request.
@return {promise} which resolves once the http request has completed.
Set an expectation that bob will query alis keys ; then flush the http request . @return { promise } which resolves once the http request has completed .
function expectBobQueryKeys() {
    expect(aliDeviceKeys).toBeDefined();
    const aliKeys = {};
    aliKeys[aliDeviceId] = aliDeviceKeys;
    bobHttpBackend.when("POST", "/keys/query").respond(200, function(path, content) {
        expect(content.device_keys[aliUserId]).toEqual({});
        const result = {};
        result[aliUserId] = aliKeys;
        return {device_keys: result};
    });
    return bobHttpBackend.flush("/keys/query", 1);
}
function expectBobQueryKeys ( ) { expect ( aliDeviceKeys ) . toBeDefined ( ) ; const aliKeys = { } ; aliKeys [ aliDeviceId ] = aliDeviceKeys ; bobHttpBackend . when ( "POST" , "/keys/query" ) . respond ( 200 , function ( path , content ) { expect ( content . device_keys [ aliUserId ] ) . toEqual ( { } ) ; const result = { } ; result [ aliUserId ] = aliKeys ; return { device_keys : result } ; } ) ; return bobHttpBackend . flush ( "/keys/query" , 1 ) ; }
Set an expectation that bob will query alis keys; then flush the http request.
Set an expectation that bob will query alis keys ; then flush the http request .
// can't query keys before ali has uploaded them