diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-19 17:09:23 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-19 17:09:23 +0100 |
commit | 53443fd1776658991091c9cc308fb86f7d3ac8ef (patch) | |
tree | 253e78f010af4e538c45fabf126dff9661ab75ee /js/tests | |
parent | 746bdb08b44f0b13a7371962dfb85d28d4704680 (diff) |
show hint when no articles to read are availabe
Diffstat (limited to 'js/tests')
-rw-r--r-- | js/tests/unit/controller/ContentControllerSpec.js | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/js/tests/unit/controller/ContentControllerSpec.js b/js/tests/unit/controller/ContentControllerSpec.js index f279906fc..9a24250e8 100644 --- a/js/tests/unit/controller/ContentControllerSpec.js +++ b/js/tests/unit/controller/ContentControllerSpec.js @@ -481,47 +481,17 @@ describe('ContentController', function () { })); + it('should publish showall', inject(function ($controller, + SettingsResource) { - it('should redirect to the explore page if there are no feeds and folders', - inject(function ($controller) { - var location = { - path: jasmine.createSpy('reload') - }; - $controller('ContentController', { - data: {}, - $location: location - }); - - expect(location.path).toHaveBeenCalledWith('/explore'); - })); - - it('should not redirect to the explore page if there are feeds and folders', - inject(function ($controller, FolderResource, FeedResource) { - - FolderResource.add({id: 3, name: 'test'}); - - var location = { - path: jasmine.createSpy('reload') - }; - $controller('ContentController', { - data: {}, - $location: location - }); - - expect(location.path).not.toHaveBeenCalledWith('/explore'); - - FolderResource.clear({id: 3, name: 'test'}); - FeedResource.add({id: 3, url: 'test'}); + SettingsResource.set('showAll', true); - location = { - path: jasmine.createSpy('reload') - }; - $controller('ContentController', { + var ctrl = $controller('ContentController', { + SettingsResource: SettingsResource, data: {}, - $location: location }); - expect(location.path).not.toHaveBeenCalledWith('/explore'); + expect(ctrl.isShowAll()).toBe(true); })); }); |