aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/angular-mocks.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/angular-mocks.js b/src/angular-mocks.js
index e2348f6b..4cf4236c 100644
--- a/src/angular-mocks.js
+++ b/src/angular-mocks.js
@@ -664,12 +664,18 @@ angular.module.ngMock.$HttpBackendProvider = function() {
}
};
- $httpBackend.verifyExpectations = function() {
+ $httpBackend.verifyNoOutstandingExpectation = function() {
if (expectations.length) {
throw Error('Unsatisfied requests: ' + expectations.join(', '));
}
};
+ $httpBackend.verifyNoOutstandingRequest = function() {
+ if (responses.length) {
+ throw Error('Unflushed requests: ' + responses.length);
+ }
+ };
+
$httpBackend.resetExpectations = function() {
expectations = [];
responses = [];