diff options
Diffstat (limited to 'test/angular-mocksSpec.js')
| -rw-r--r-- | test/angular-mocksSpec.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/angular-mocksSpec.js b/test/angular-mocksSpec.js index 4551d11d..183c7d74 100644 --- a/test/angular-mocksSpec.js +++ b/test/angular-mocksSpec.js @@ -1,6 +1,32 @@ 'use strict'; describe('mocks', function() { + + describe('$browser', function() { + + describe('addJs', function() { + + it('should store url, id, done', inject(function($browser) { + var url = 'some.js', + id = 'js-id', + done = noop; + + $browser.addJs(url, id, done); + + var script = $browser.$$scripts.shift(); + expect(script.url).toBe(url); + expect(script.id).toBe(id); + expect(script.done).toBe(done); + })); + + + it('should return the script object', inject(function($browser) { + expect($browser.addJs('some.js', null, noop)).toBe($browser.$$scripts[0]); + })); + }); + }); + + describe('TzDate', function() { function minutes(min) { |
