aboutsummaryrefslogtreecommitdiffstats
path: root/test/angular-mocksSpec.js
diff options
context:
space:
mode:
authorIgor Minar2011-12-27 15:52:57 -0800
committerVojta Jina2012-01-09 13:17:48 -0800
commit63cca9afbcf7a772086eb4582d2f409c39e0ed12 (patch)
tree521c9c1e493fb47ea3de1a4a9c08b71e47cb60af /test/angular-mocksSpec.js
parentd47ec772c3d6b418121c81bbaf2dcb8a24742125 (diff)
downloadangular.js-63cca9afbcf7a772086eb4582d2f409c39e0ed12.tar.bz2
feat(browser.defer): flush should throw exception when queue is empty
Diffstat (limited to 'test/angular-mocksSpec.js')
-rw-r--r--test/angular-mocksSpec.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/angular-mocksSpec.js b/test/angular-mocksSpec.js
index 5d0be7ad..a8328f41 100644
--- a/test/angular-mocksSpec.js
+++ b/test/angular-mocksSpec.js
@@ -291,6 +291,10 @@ describe('mocks', function() {
expect(browser.defer.now).toEqual(3);
expect(log).toEqual('A;B;C;');
});
+
+ it('should throw an exception if there is nothing to be flushed', function() {
+ expect(function() {browser.defer.flush();}).toThrow('No deferred tasks to be flushed');
+ });
});