I'm trying to create a test case for my web service which uses $http. The problem is, that I use dynamic links to get data from the web service like here:
.factory('WebService', function($http,$q) {
var getData = function(url,vid) {
  var url = 'http://' + url + '/WebService.asmx/CallFunction';
  var req = {
    method: 'POST',
    url: url,
    headers: {
      'Content-Type': 'application/json; charset=utf-8'
    },
    data: {
      method: 'MyFunction',
      data: vid
    },
    timeout: 10000,
    crossDomain: true
  };
  return $http(req);
};
return {
  getData: getData
};
});
GetData is called like this from a controller:
var promiseGetData = getData(url,vid);
Well how do I write a test case for this function? I couldn't find any example in the internet with dynamic links plus I'm very new in writing jasmine tests.