diff options
Diffstat (limited to 'js/tests/services/persistenceSpec.coffee')
-rw-r--r-- | js/tests/services/persistenceSpec.coffee | 27 |
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) |