I want to test my code with real API calls (so I can test the API as well, and when I change the API I don't have to change the JS test as well, and a lot more benefits.) instead of the regular $httpBackend.expectPOST('http://api.com/login').response(200)
.
Essentially, I want to test a ProductsController
that expects to be logged in through an AuthService.login()
method and receive a list of products through ui-router
's resolve
feature.
In this case, the login
method receives data that needs to be used to gather products.