diff options
Diffstat (limited to 'js/tests/unit/controller/AppControllerSpec.js')
-rw-r--r-- | js/tests/unit/controller/AppControllerSpec.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/js/tests/unit/controller/AppControllerSpec.js b/js/tests/unit/controller/AppControllerSpec.js index 90dd0aab8..a54b3b034 100644 --- a/js/tests/unit/controller/AppControllerSpec.js +++ b/js/tests/unit/controller/AppControllerSpec.js @@ -10,14 +10,21 @@ describe('AppController', function () { 'use strict'; - var controller; + var controller, + location; beforeEach(module('News', function ($provide) { $provide.value('BASE_URL', 'base'); })); beforeEach(inject(function ($controller) { - controller = $controller('AppController'); + location = { + path: jasmine.createSpy('path') + }; + + controller = $controller('AppController', { + $location: location + }); })); @@ -43,6 +50,7 @@ describe('AppController', function () { FolderResource.add({name: 'test'}); expect(controller.isFirstRun()).toBe(false); + expect(location.path).not.toHaveBeenCalled(); })); });
\ No newline at end of file |