I am trying to test rest service like "/service/home/autolaunch?rnd=" The query parameter "rnd" value always is unique to get rid of internet explorer caching issue. While writing jasmine test case for above back end service- I got error 'Unexpected request' as query parameter is different for each time. is there any way to skip query parameter while writing jasmine test.
In service the call is like that-
http.get('/service/home/autolaunch', {params:{rnd:new Date().getTime()}}).then(
function(data){
// TO do
});
The Jasmine test case is-
httpBackend.when('GET','/service/home/autolaunch').respond(-- to do);
even if define test case in following way-
httpBackend.when('GET','/service/home/autolaunch?rnd=' + new Date().getTime()).respond(-- to do);
still getting Unexpected request.
After doing debugging got to know the time stamp value is different.