Trying to create a mock for $.ajax calls using $httpBackend.
The below mocking snippet worked fine for worked fine with $http.get('/phones')
$httpBackend.whenGET('/phones')
But when tried to use the same for
$.ajax({
url: '/phones',
type: 'GET'
})
This threw a 404 error for the '/phones' ajax call.
Jsfiddler link here.