From df8f6b5fee643c5b2af8e8d33a7865e898518485 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Sat, 14 Sep 2013 02:22:36 +0200 Subject: implement pull to refresh, fix #44 --- js/tests/services/models/itemmodelSpec.coffee | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'js/tests/services/models/itemmodelSpec.coffee') diff --git a/js/tests/services/models/itemmodelSpec.coffee b/js/tests/services/models/itemmodelSpec.coffee index 4decc7918..d2fed6630 100644 --- a/js/tests/services/models/itemmodelSpec.coffee +++ b/js/tests/services/models/itemmodelSpec.coffee @@ -110,4 +110,13 @@ describe 'ItemModel', -> @ItemModel.add({id: 1, guidHash: 'abce', feedId: 2, status: 16}) @ItemModel.add({id: 6, guidHash: 'abcf', feedId: 2, status: 16}) - expect(@ItemModel.getLowestId()).toBe(1) \ No newline at end of file + expect(@ItemModel.getLowestId()).toBe(1) + + + it 'should return the highest lastModified', => + @ItemModel.add({id: 2, guidHash: 'abc', feedId: 2, lastModified: 3}) + @ItemModel.add({id: 3, guidHash: 'abcd', feedId: 2, lastModified: 13}) + @ItemModel.add({id: 1, guidHash: 'abce', feedId: 2, lastModified: 15}) + @ItemModel.add({id: 6, guidHash: 'abcf', feedId: 2, lastModified: 11}) + + expect(@ItemModel.getLastModified()).toBe(15) \ No newline at end of file -- cgit v1.2.3