summaryrefslogtreecommitdiffstats
path: root/js/tests/unit/controller/ExploreControllerSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tests/unit/controller/ExploreControllerSpec.js')
-rw-r--r--js/tests/unit/controller/ExploreControllerSpec.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/tests/unit/controller/ExploreControllerSpec.js b/js/tests/unit/controller/ExploreControllerSpec.js
index a323e8d65..977ab5c32 100644
--- a/js/tests/unit/controller/ExploreControllerSpec.js
+++ b/js/tests/unit/controller/ExploreControllerSpec.js
@@ -60,4 +60,15 @@ describe('ExploreController', function () {
expect(controller.feedExists('amen')).toBe(false);
}));
+
+ it('should hide categories without unadded sites', inject(
+ function (FeedResource) {
+ FeedResource.add({id: 3, url: 'test'});
+
+ var data1 = [{url: 'test'}, {url: 'test2'}];
+ var data2 = [{url: 'test'}];
+
+ expect(controller.isCategoryShown(data1)).toBe(true);
+ expect(controller.isCategoryShown(data2)).toBe(false);
+ }));
}); \ No newline at end of file