Created
September 25, 2015 09:15
-
-
Save blackrabbit99/5cc594f790adf36e031e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe("spec", function () { | |
var server, fakeData = [ {a:1}, {b:2}, {c:3} ]; | |
before(function () { | |
server = sinon.fakeServer.create(); | |
server.respondWith( | |
"GET", | |
"https://myhost.local/url/5", | |
[200, { "Content-Type": "application/json" }, JSON.stringify(fakeData)] | |
); | |
}); | |
it("test ajax", function (done) { | |
model.fetch().done(function(resp){ | |
console.log('resp', resp); | |
}); | |
server.respond(); | |
}); | |
after(function () { server.restore(); }); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment