aboutsummaryrefslogtreecommitdiffstats
path: root/test/angular-mocksSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/angular-mocksSpec.js')
-rw-r--r--test/angular-mocksSpec.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/angular-mocksSpec.js b/test/angular-mocksSpec.js
index d7f40bb2..248bb108 100644
--- a/test/angular-mocksSpec.js
+++ b/test/angular-mocksSpec.js
@@ -780,6 +780,21 @@ describe('mocks', function() {
expect(callback).toHaveBeenCalledOnce();
expect(cancelledClb).not.toHaveBeenCalled();
});
+
+
+ it('should not remove definitions', function() {
+ var cancelledClb = jasmine.createSpy('cancelled');
+
+ hb.when('GET', '/url').respond(200, 'success');
+ hb('GET', '/url', null, cancelledClb);
+ hb.resetExpectations();
+
+ hb('GET', '/url', null, callback, {});
+ hb.flush();
+
+ expect(callback).toHaveBeenCalledOnce();
+ expect(cancelledClb).not.toHaveBeenCalled();
+ });
});