summaryrefslogtreecommitdiffstats
path: root/js/tests/unit/controller/ContentControllerSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tests/unit/controller/ContentControllerSpec.js')
-rw-r--r--js/tests/unit/controller/ContentControllerSpec.js42
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);
}));
});