Created
October 17, 2014 11:22
-
-
Save joachimhs/4b7046b2b74751ed82ff to your computer and use it in GitHub Desktop.
helper
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
Ember.Test.registerHelper("mockAjaxGet", function(app, url, responseStatus, responseJson) { | |
console.log("STUBBING: " + url + " responseStatus: " + responseStatus + " JSON: " + responseJson); | |
window.server.get(url, function(request) { | |
return [responseStatus, {"Content-Type": "application/json"}, responseJson]; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment