Testing angular ngResource custom $http calls