summaryrefslogtreecommitdiffstats
path: root/js/tests/services/businesslayer/subsriptionsbusinesslayerSpec.coffee
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-05-09 14:03:37 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-05-09 14:03:37 +0200
commit019b286b8e997bea3fb6a0555c91c565ca2d684f (patch)
treed162de276a9571f89f29fc0691258f38571edff8 /js/tests/services/businesslayer/subsriptionsbusinesslayerSpec.coffee
parent59069e85a26dd72bb1798e0ee517d607f6021443 (diff)
Fix a bug that would mark the items on the right side as read regardless of feed or folder id
Diffstat (limited to 'js/tests/services/businesslayer/subsriptionsbusinesslayerSpec.coffee')
-rw-r--r--js/tests/services/businesslayer/subsriptionsbusinesslayerSpec.coffee5
1 files changed, 5 insertions, 0 deletions
diff --git a/js/tests/services/businesslayer/subsriptionsbusinesslayerSpec.coffee b/js/tests/services/businesslayer/subsriptionsbusinesslayerSpec.coffee
index 9e3437b3c..26698ae3c 100644
--- a/js/tests/services/businesslayer/subsriptionsbusinesslayerSpec.coffee
+++ b/js/tests/services/businesslayer/subsriptionsbusinesslayerSpec.coffee
@@ -83,6 +83,11 @@ describe 'SubscriptionsBusinessLayer', ->
expect(@persistence.setAllRead).toHaveBeenCalledWith(25)
+ it 'should not mark all read when no highest item id', =>
+ @persistence.setAllRead = jasmine.createSpy('setAllRead')
+ @SubscriptionsBusinessLayer.markRead()
+ expect(@persistence.setAllRead).not.toHaveBeenCalled()
+
it 'should get the correct unread count', =>
@FeedModel.add({id: 3, unreadCount: 132, url: 'hoho'})
@FeedModel.add({id: 4, unreadCount: 12, url: 'hohod'})