Quantcast
Channel: MarsHut
Viewing all articles
Browse latest Browse all 6551

Problem with $httpBackend mocks

$
0
0
I am getting an error on calling the $httpBackend module. My $http call is
as follows.

$http({method: "get", cache: false, url: claimUrl}).success(someFunction);

When the $http call is intercepted the $httpBackend call fails because it
is expecting a method and a url not an object containing those.

Here is the error I get

Error: Unexpected request: [object Object] undefined

Is that method of calling $httpBackend supported or do I have to write
something custom to make it work?

Viewing all articles
Browse latest Browse all 6551