modify example code
'response' method is deprecated. use 'respondWith' instead of
This commit is contained in:
parent
d9da8636f9
commit
d3d64a87b8
@ -126,7 +126,7 @@ Now that you've defined some test responses and installed the mock, you need to
|
||||
|
||||
describe("on success", function() {
|
||||
beforeEach(function() {
|
||||
request.response(TestResponses.search.success);
|
||||
request.respondWith(TestResponses.search.success);
|
||||
});
|
||||
|
||||
Now for all the specs in this example group, whenever an Ajax response is sent, it will use the `TestResponses.search.success` object defined in your test responses to build the XMLHttpRequest object.
|
||||
@ -159,7 +159,7 @@ Putting it all together, you can install the mock, pass some spies as callbacks
|
||||
|
||||
describe("on success", function() {
|
||||
beforeEach(function() {
|
||||
request.response(TestResponses.search.success);
|
||||
request.respondWith(TestResponses.search.success);
|
||||
});
|
||||
|
||||
it("calls onSuccess with an array of Locations", function() {
|
||||
|
Loading…
Reference in New Issue
Block a user