diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-27 18:07:48 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-27 18:07:48 +0100 |
commit | d97e2b1f0e26b113f870a09c5cc3ab384f1c1d94 (patch) | |
tree | 99061e8fda3265dec807b0fc1a67e65520f9b3e7 /js/tests/services/models/itemmodelSpec.coffee | |
parent | d1d775da219e79e134c55d978ebc96c728d77958 (diff) |
fixed bug that didnt add feeds when they were deleted once
Diffstat (limited to 'js/tests/services/models/itemmodelSpec.coffee')
-rw-r--r-- | js/tests/services/models/itemmodelSpec.coffee | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/js/tests/services/models/itemmodelSpec.coffee b/js/tests/services/models/itemmodelSpec.coffee index 7d929b223..364c07b80 100644 --- a/js/tests/services/models/itemmodelSpec.coffee +++ b/js/tests/services/models/itemmodelSpec.coffee @@ -56,4 +56,16 @@ describe '_ItemModel', -> expect(model.getById(3).feedId).toBe(item4.feedId) expect(model.getById(3).id).toBe(item4.id) expect(model.getById(5)).toBe(undefined) - expect(model.size()).toBe(2)
\ No newline at end of file + expect(model.size()).toBe(2) + + + it 'should also remove the feed from the urlHash cache when its removed', => + model = new @_ItemModel() + item = {id: 4, guidHash: 'abc', feedId: 3} + model.add(item) + + expect(model.getById(4)).toBe(item) + expect(model.getByGuidHashAndFeedId('abc', 3)).toBe(item) + + model.removeById(4) + expect(model.getByGuidHashAndFeedId('abc', 3)).toBe(undefined)
\ No newline at end of file |