ngMockE2E / $httpBackend interaction with response interceptor

Hello,

I am using ngMockE2E / $httpBackend to fake a REST API. The purpose is not for unit testing. The REST API has not yet been written. I am developing the mobile app in parallel. So I need to fully fake every response from the server. I am also using a http response interceptor to manipulate the response.

I am that for URLs that are matched by $httpBackend.when (…) the response interceptor is not called. Instead the response goes directly to my controller, the caller of $http.get (…). Perhaps it’s because the use of $httpBackend.when (…) assumes that the entire response is handled by the mock. This prevents my response interceptor from checking the status code and adding other information to the response. In normal operation where a mock is not used, the interceptor is called. I want the mock to act as a transparent stand in for the web service, providing identical responses, and otherwise not infer with the interceptor.

Any ideas how to get my response interceptor called regardless of whether I’m using ngMockE2E? Again, I’m not unit testing, just replacing the backend for every API.

Thanks
Jason