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/service/PublisherSpec.js | |
parent | ea9ebd4826fe9807af5bc17e786b3dc58f163970 (diff) |
port to ES5, fix unread count going into minus
Diffstat (limited to 'js/tests/unit/service/PublisherSpec.js')
-rw-r--r-- | js/tests/unit/service/PublisherSpec.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/js/tests/unit/service/PublisherSpec.js b/js/tests/unit/service/PublisherSpec.js index 38efa9398..3bd846107 100644 --- a/js/tests/unit/service/PublisherSpec.js +++ b/js/tests/unit/service/PublisherSpec.js @@ -7,17 +7,18 @@ * @author Bernhard Posselt <dev@bernhard-posselt.com> * @copyright Bernhard Posselt 2014 */ -describe('Publisher', () => { +describe('Publisher', function () { 'use strict'; beforeEach(module('News')); - it('should should publish on all possible channels', inject((Publisher) => { - let obj = { + it('should should publish on all possible channels', + inject(function (Publisher) { + var obj = { receive: jasmine.createSpy('receive') }; - Publisher.subscribe(obj).toChannels('test'); + Publisher.subscribe(obj).toChannels(['test']); Publisher.publishAll({ test: 'tom' @@ -27,12 +28,13 @@ describe('Publisher', () => { })); - it('should should publish on all possible channels', inject((Publisher) => { + it('should should publish on all possible channels', + inject(function (Publisher) { var obj = { receive: jasmine.createSpy('receive') }; - Publisher.subscribe(obj).toChannels('test', 'tiny'); + Publisher.subscribe(obj).toChannels(['test', 'tiny']); Publisher.publishAll({ tiny: 'tom' @@ -42,7 +44,8 @@ describe('Publisher', () => { })); - it('should not broadcast not subscribed channels', inject((Publisher) => { + it('should not broadcast not subscribed channels', + inject(function (Publisher) { Publisher.publishAll({ test: 'tom' }); |