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.coffee16
1 files changed, 16 insertions, 0 deletions
diff --git a/js/tests/services/persistenceSpec.coffee b/js/tests/services/persistenceSpec.coffee
index e9f12f669..38e02705a 100644
--- a/js/tests/services/persistenceSpec.coffee
+++ b/js/tests/services/persistenceSpec.coffee
@@ -74,6 +74,22 @@ describe 'Persistence', ->
expect(@req.get).toHaveBeenCalledWith('news_items', expected)
+ it 'should send a load new items request', =>
+ success = ->
+ params =
+ data:
+ type: 2
+ id: 5
+ lastModified: 3
+ onSuccess: success
+ onFailure: success
+
+ @Persistence.getNewItems(params.data.type, params.data.id,
+ params.data.lastModified, success)
+
+ expect(@req.get).toHaveBeenCalledWith('news_items_new', params)
+
+
it 'send a correct star item request', =>
params =
routeParams: