unittests/tests/dataloader.js
branchpopcorn-port
changeset 68 5469b2b9743f
parent 64 b13359f9ce48
child 75 f5a7299bd0ff
equal deleted inserted replaced
67:d0c32e1c7401 68:5469b2b9743f
    23 
    23 
    24     var spy_callback = this.spy();
    24     var spy_callback = this.spy();
    25     var dt = new IriSP.DataLoader();
    25     var dt = new IriSP.DataLoader();
    26     
    26     
    27     var resp = dt.get("/url", spy_callback);
    27     var resp = dt.get("/url", spy_callback);
    28     //IriSP.jQuery.get("/url", spy_callback);
    28 
    29     equals(xhr.requests.length, 1, "the mock ajax object should have received the request");
    29     equals(xhr.requests.length, 1, "the mock ajax object should have received the request");
    30     
    30     
    31     xhr.requests[0].respond(200, { "Content-Type": "application/json" },
    31     xhr.requests[0].respond(200, { "Content-Type": "application/json" },
    32                              response_string);
    32                              response_string);
    33     
    33