diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-21 12:49:26 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-21 12:57:03 +0100 |
commit | 6d3e829821707095269590f8a880f88d1cf8c980 (patch) | |
tree | 4f49c314b4602faed9909daf6e904da64cdd2479 /js/tests/unit/controller/ExploreControllerSpec.js | |
parent | 1ef00530bd5eab6688b297197b775d3d6289fa6f (diff) |
hide categories without elements
Diffstat (limited to 'js/tests/unit/controller/ExploreControllerSpec.js')
-rw-r--r-- | js/tests/unit/controller/ExploreControllerSpec.js | 11 |
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 |