diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/BrowserSpecs.js | 1 | ||||
| -rw-r--r-- | test/servicesSpec.js | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/test/BrowserSpecs.js b/test/BrowserSpecs.js index a9f61a6b..48387b4d 100644 --- a/test/BrowserSpecs.js +++ b/test/BrowserSpecs.js @@ -4,7 +4,6 @@ describe('browser', function(){ beforeEach(function(){ location = {href:"http://server", hash:""}; - document = jqLite(window.document); head = { scripts: [], append: function(node){head.scripts.push(node);} diff --git a/test/servicesSpec.js b/test/servicesSpec.js index 90f3d12b..031c48f0 100644 --- a/test/servicesSpec.js +++ b/test/servicesSpec.js @@ -1,5 +1,5 @@ describe("service", function(){ - var scope, $xhrError, $log; + var scope, $xhrError, $log, mockServices; beforeEach(function(){ $xhrError = jasmine.createSpy('$xhr.error'); @@ -38,7 +38,7 @@ describe("service", function(){ function warn(){ logger+= 'warn;'; }; function info(){ logger+= 'info;'; }; function error(){ logger+= 'error;'; }; - var scope = createScope(null, angularService, {$window: {console:{log:log, warn:warn, info:info, error:error}}}); + var scope = createScope(null, angularService, {$window: {console:{log:log, warn:warn, info:info, error:error}}, $document:[{}]}); scope.$log.log(); scope.$log.warn(); scope.$log.info(); @@ -49,7 +49,7 @@ describe("service", function(){ it('should use console.log if other not present', function(){ var logger = ""; function log(){ logger+= 'log;'; }; - var scope = createScope(null, angularService, {$window: {console:{log:log}}}); + var scope = createScope(null, angularService, {$window: {console:{log:log}}, $document:[{}]}); scope.$log.log(); scope.$log.warn(); scope.$log.info(); @@ -58,7 +58,7 @@ describe("service", function(){ }); it('should use noop if no console', function(){ - var scope = createScope(null, angularService, {$window: {}}); + var scope = createScope(null, angularService, {$window: {}, $document:[{}]}); scope.$log.log(); scope.$log.warn(); scope.$log.info(); |
