I had this issue earlier, here is how I solved it.

Jasmine spec runner was returning ‘Error: Unexpected request: GET /locations/1 No more request expected.’ I stubbed the call by specifying the action (GET) and the path (‘locations/1’). If you are relying on the response data in your test then return the appropriate JSON object(s) instead of an empty array.

...
beforeEach inject(($controller, $rootScope, $httpBackend, $location) ->
  ...
  $httpBackend.whenGET('/locations/1').respond([])
  ...
)
...

Comments