equal
deleted
inserted
replaced
36 ok(spy_callback.calledWith(response_array), "callback called with correct string"); |
36 ok(spy_callback.calledWith(response_array), "callback called with correct string"); |
37 |
37 |
38 deepEqual(dt._cache["/url"], response_array, "the response should be stored in the cache"); |
38 deepEqual(dt._cache["/url"], response_array, "the response should be stored in the cache"); |
39 |
39 |
40 var resp2 = dt.get("/url&a=2", spy_callback); |
40 var resp2 = dt.get("/url&a=2", spy_callback); |
41 ok(spy_callback.calledOnce, "callback called only once"); |
41 ok(spy_callback.calledTwice && xhr.requests.length === 1, "callback called twice but request made only once."); |
42 |
42 |
43 }); |
43 }); |
44 |
44 |
45 } |
45 } |