diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-21 23:43:28 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-21 23:43:28 +0200 |
commit | 0fa67552247b2d29a6ca438c2605b8db2bbdbab7 (patch) | |
tree | 8109135e2fc141a324e8f21c66243ee4277b3b7c /js/tests/unit/controller | |
parent | d3a774b2bd79654360a3ef12618102abf85a2ce3 (diff) |
es6 all the things
Diffstat (limited to 'js/tests/unit/controller')
-rw-r--r-- | js/tests/unit/controller/AppControllerSpec.js | 14 | ||||
-rw-r--r-- | js/tests/unit/controller/ContentControllerSpec.js | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/js/tests/unit/controller/AppControllerSpec.js b/js/tests/unit/controller/AppControllerSpec.js index d44d8b0c3..fc5780a40 100644 --- a/js/tests/unit/controller/AppControllerSpec.js +++ b/js/tests/unit/controller/AppControllerSpec.js @@ -7,36 +7,36 @@ * @author Bernhard Posselt <dev@bernhard-posselt.com> * @copyright Bernhard Posselt 2014 */ -describe('AppController', function () { +describe('AppController', () => { 'use strict'; - var controller; + let controller; beforeEach(module('News')); - beforeEach(inject(function ($controller) { + beforeEach(inject(($controller) => { controller = $controller('AppController'); })); - it('should expose Loading', inject(function (Loading) { + it('should expose Loading', inject((Loading) => { expect(controller.loading).toBe(Loading); })); - it('should expose set firstrun if no feeds and folders', inject(function () { + it('should expose set firstrun if no feeds and folders', inject(() => { expect(controller.isFirstRun()).toBe(true); })); - it('should expose set firstrun if feeds', inject(function (FeedResource) { + it('should expose set firstrun if feeds', inject((FeedResource) => { FeedResource.add({url: 'test'}); expect(controller.isFirstRun()).toBe(false); })); - it('should expose set firstrun if folders', inject(function (FolderResource) { + it('should expose set firstrun if folders', inject((FolderResource) => { FolderResource.add({name: 'test'}); expect(controller.isFirstRun()).toBe(false); diff --git a/js/tests/unit/controller/ContentControllerSpec.js b/js/tests/unit/controller/ContentControllerSpec.js index c99cb79ab..1dbd3d936 100644 --- a/js/tests/unit/controller/ContentControllerSpec.js +++ b/js/tests/unit/controller/ContentControllerSpec.js @@ -7,19 +7,19 @@ * @author Bernhard Posselt <dev@bernhard-posselt.com> * @copyright Bernhard Posselt 2014 */ -describe('ContentController', function () { +describe('ContentController', () => { 'use strict'; beforeEach(module('News')); - it('should publish data to models', inject(function ($controller, Publisher, - FeedResource, ItemResource) { + it('should publish data to models', inject(($controller, Publisher, + FeedResource, ItemResource) => { Publisher.subscribe(ItemResource).toChannels('items'); Publisher.subscribe(FeedResource).toChannels('feeds'); - var controller = $controller('ContentController', { + let controller = $controller('ContentController', { data: { 'items': [ { |