Hey guys, when I am unit testing Angular code using $httpBackend, how can I respond with a
json file instead of hard coding it in the test file?
Snippet:
$httpBackend.expectGET('../test/unit/product/products.json').
respond([{short_code: 'Bulk'}, {short_code: 'Outsourced'}]);
I am only just getting started with programming, so let me know if this isn't the right way to do it. Basically, I am looking to keep the json file separate so it is easy for me to modify that file if the backend data changes without changing the test case.
Thanks!