diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-04 21:57:17 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-04 21:57:17 +0200 |
commit | d001da33947a0fa1b65f0e1b5749e9b97bd4b779 (patch) | |
tree | 73f6ff957e67dc31092a30d883fe36e421bd6b48 /js/tests/services/bl/feedblSpec.coffee | |
parent | 76267670f3dcb6793a62a30477db830f482b4495 (diff) |
cleaned up feedcontroller
Diffstat (limited to 'js/tests/services/bl/feedblSpec.coffee')
-rw-r--r-- | js/tests/services/bl/feedblSpec.coffee | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/js/tests/services/bl/feedblSpec.coffee b/js/tests/services/bl/feedblSpec.coffee index 2ca742cc7..27b681a32 100644 --- a/js/tests/services/bl/feedblSpec.coffee +++ b/js/tests/services/bl/feedblSpec.coffee @@ -152,4 +152,30 @@ describe 'FeedBl', -> @FeedModel.add({id: 2, unreadCount:134, urlHash: 'a1', folderId: 3}) @FeedBl.move(2, 3) - expect(@persistence.moveFeed).not.toHaveBeenCalled()
\ No newline at end of file + expect(@persistence.moveFeed).not.toHaveBeenCalled() + + + it 'should set the show all setting', => + @persistence.userSettingsReadShow = jasmine.createSpy('Show All') + @FeedBl.setShowAll(true) + + expect(@persistence.userSettingsReadShow).toHaveBeenCalled() + + + + it 'should set the hide read setting', => + @persistence.userSettingsReadHide = jasmine.createSpy('Hide Read') + @FeedBl.setShowAll(false) + + expect(@persistence.userSettingsReadHide).toHaveBeenCalled() + + + it 'should return all feeds', => + item1 = {id: 2, unreadCount:134, urlHash: 'a1', folderId: 3} + item2 = {id: 4, unreadCount:134, urlHash: 'a2', folderId: 3} + @FeedModel.add(item1) + @FeedModel.add(item2) + + expect(@FeedBl.getAll()).toContain(item1) + expect(@FeedBl.getAll()).toContain(item2) + |