aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/angular-mocks.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/angular-mocks.js b/src/angular-mocks.js
index 60211e6f..6f69f0d6 100644
--- a/src/angular-mocks.js
+++ b/src/angular-mocks.js
@@ -631,8 +631,10 @@ angular.module.ngMock.$HttpBackendProvider = function() {
return method == 'JSONP' ? undefined : xhr;
}
}
- throw wasExpected ? Error('No response defined !') :
- Error('Unexpected request: ' + method + ' ' + url);
+ throw wasExpected ?
+ Error('No response defined !') :
+ Error('Unexpected request: ' + method + ' ' + url + '\n' +
+ (expectation ? 'Expected ' + expectation : 'No more request expected'));
}
$httpBackend.when = function(method, url, data, headers) {