I\'m trying to match an url with a regex. But the follwing regex doesn\'t match.
$httpBackend.whenGET(\'/^rest\\/find-reservations\\?.*/)\').respond(function
this.httpBackend.whenGET(new RegExp('.*')).respond(function(){ return [200, 'MISS', {}] });
this.httpBackend.whenPOST('/report/').respond(function(){return [200, 'HIT', {}] ; });
this.httpBackend.whenPOST(new RegExp('.*')).respond(function(){ return [200, 'MISS', {}] });
var _received;
var result = this.reportService.save(new this.Report());
result.then(function(response){
_received = response.data;
});
this.httpBackend.flush();
expect(_received).toBe('HIT');