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