diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-11 14:32:59 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-11 14:32:59 +0200 |
commit | 793bd2177367c32d205c19950be33a8afc3c76e1 (patch) | |
tree | 7a36495ecb43e998e95dd21ec60ce943338ad80c /js/tests/unit/controller/SettingsControllerSpec.js | |
parent | ea9ebd4826fe9807af5bc17e786b3dc58f163970 (diff) |
port to ES5, fix unread count going into minus
Diffstat (limited to 'js/tests/unit/controller/SettingsControllerSpec.js')
-rw-r--r-- | js/tests/unit/controller/SettingsControllerSpec.js | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/js/tests/unit/controller/SettingsControllerSpec.js b/js/tests/unit/controller/SettingsControllerSpec.js index fbe8b3438..ac6d2c9b6 100644 --- a/js/tests/unit/controller/SettingsControllerSpec.js +++ b/js/tests/unit/controller/SettingsControllerSpec.js @@ -7,28 +7,28 @@ * @author Bernhard Posselt <dev@bernhard-posselt.com> * @copyright Bernhard Posselt 2014 */ -describe('SettingsController', () => { +describe('SettingsController', function () { 'use strict'; - let route; + var route; - beforeEach(module('News', ($provide) => { + beforeEach(module('News', function ($provide) { $provide.value('BASE_URL', 'base'); })); - beforeEach(() => { + beforeEach(function () { route = { reload: jasmine.createSpy('Route') }; }); - it('should set values', inject(($controller) => { - let SettingsResource = { + it('should set values', inject(function ($controller) { + var SettingsResource = { set: jasmine.createSpy('SettingsResource'), - get: key => key + get: function (key) { return key; } }; - let ctrl = $controller('SettingsController', { + var ctrl = $controller('SettingsController', { SettingsResource: SettingsResource, $route: route }); @@ -39,13 +39,13 @@ describe('SettingsController', () => { })); - it('should reload page if set needed', inject(($controller) => { - let SettingsResource = { + it('should reload page if set needed', inject(function ($controller) { + var SettingsResource = { set: jasmine.createSpy('SettingsResource'), - get: key => key + get: function (key) { return key; } }; - let ctrl = $controller('SettingsController', { + var ctrl = $controller('SettingsController', { SettingsResource: SettingsResource, $route: route }); @@ -59,10 +59,10 @@ describe('SettingsController', () => { })); - it('should return feed size', inject(($controller, FeedResource) => { + it('should return feed size', inject(function ($controller, FeedResource) { FeedResource.add({url: 'hi'}); - let ctrl = $controller('SettingsController', { + var ctrl = $controller('SettingsController', { FeedResource: FeedResource, $route: route }); |