summaryrefslogtreecommitdiffstats
path: root/js/tests/services/models/itemmodelSpec.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'js/tests/services/models/itemmodelSpec.coffee')
-rw-r--r--js/tests/services/models/itemmodelSpec.coffee11
1 files changed, 10 insertions, 1 deletions
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