summaryrefslogtreecommitdiffstats
path: root/js/tests/services/persistenceSpec.coffee
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-26 11:20:55 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-26 11:52:50 +0200
commitf987751d8c5c7a3ee660411afb9d01e6a822aed5 (patch)
tree9eb35d0575c62648b7f50e6c94afb808366cf05c /js/tests/services/persistenceSpec.coffee
parentd947c35d05ddb12dad591d29a9b0f948c5f4f732 (diff)
order by pubdate on the client side fix #115
Diffstat (limited to 'js/tests/services/persistenceSpec.coffee')
-rw-r--r--js/tests/services/persistenceSpec.coffee27
1 files changed, 4 insertions, 23 deletions
diff --git a/js/tests/services/persistenceSpec.coffee b/js/tests/services/persistenceSpec.coffee
index 90bd82783..91d732c5e 100644
--- a/js/tests/services/persistenceSpec.coffee
+++ b/js/tests/services/persistenceSpec.coffee
@@ -56,10 +56,12 @@ describe 'Persistence', ->
id: 5
limit: @config.itemBatchSize
offset: 3
+ newestItemId: 4
onSuccess: ->
@Persistence.getItems(params.data.type, params.data.id,
- params.data.offset, params.onSuccess, null)
+ params.data.offset, params.data.newestItemId,
+ params.onSuccess)
expected =
onSuccess: jasmine.any(Function)
@@ -69,28 +71,7 @@ describe 'Persistence', ->
id: 5
limit: @config.itemBatchSize
offset: 3
-
- expect(@req.get).toHaveBeenCalledWith('news_items', expected)
-
-
- it 'should send a load newest items request', =>
- params =
- data:
- type: 2
- id: 5
- updatedSince: 1333
- onSuccess: ->
-
- @Persistence.getItems(params.data.type, params.data.id, 0,
- params.onSuccess, params.data.updatedSince)
-
- expected =
- onSuccess: jasmine.any(Function)
- onFailure: jasmine.any(Function)
- data:
- type: 2
- id: 5
- updatedSince: 1333
+ newestItemId: 4
expect(@req.get).toHaveBeenCalledWith('news_items', expected)