In my project I build some of my HTTP requests like so:
var options = {
params:{
foo: 'bar'
hello: world
}
};
$http.get("my/service", options)
Which means that the final HTTP call looks something like my/service?foo=bar&hello=worldVar
How do I setup my $httpBackend
to account for this?
The problems I see are:
- I'm not guaranteed order in my parameters with this style, which means setting up the first parameter in
expectGet
will be hard. - Its hard to test calls when I really don't care about the parameters