summaryrefslogtreecommitdiffstats
path: root/js/tests/services/persistenceSpec.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'js/tests/services/persistenceSpec.coffee')
-rw-r--r--js/tests/services/persistenceSpec.coffee24
1 files changed, 23 insertions, 1 deletions
diff --git a/js/tests/services/persistenceSpec.coffee b/js/tests/services/persistenceSpec.coffee
index e42d3bb17..16f8cbd69 100644
--- a/js/tests/services/persistenceSpec.coffee
+++ b/js/tests/services/persistenceSpec.coffee
@@ -117,6 +117,14 @@ describe 'Persistence', ->
expect(@req.post).toHaveBeenCalledWith('news_items_unread', params)
+ it 'shoud send a correct request for marking all items read', =>
+ params =
+ data:
+ highestItemId: 4
+
+ @Persistence.setAllRead(params.data.highestItemId)
+
+
###
FEED CONTROLLER
@@ -153,7 +161,7 @@ describe 'Persistence', ->
expect(@req.post).toHaveBeenCalledWith('news_feeds_move', params)
- it 'shoud send a correct request for marking all items read', =>
+ it 'shoud send a correct request for marking all items of a feed read', =>
params =
data:
highestItemId: 4
@@ -298,6 +306,20 @@ describe 'Persistence', ->
expect(@req.post).toHaveBeenCalledWith('news_folders_rename', params)
+ it 'shoud send a correct request for marking all items of a folders read', =>
+ params =
+ data:
+ highestItemId: 4
+ routeParams:
+ folderId: 3
+
+ @Persistence.setFolderRead(params.routeParams.folderId,
+ params.data.highestItemId)
+
+
+ expect(@req.post).toHaveBeenCalledWith('news_folders_read', params)
+
+
###
EXPORT CONTROLLER
###