summaryrefslogtreecommitdiffstats
path: root/js/tests
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-12 12:25:58 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-12 12:25:58 +0200
commite8767f75116ff7ef2b7a349480151c9f66bbade0 (patch)
tree5879fe01fa8113a299daaba4d2c6cfa84769a104 /js/tests
parente9eaa93826c75097d95d21a556e1b1aae6610bcd (diff)
implement clientside update requests, fix #27
Diffstat (limited to 'js/tests')
-rw-r--r--js/tests/services/bl/feedblSpec.coffee17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/tests/services/bl/feedblSpec.coffee b/js/tests/services/bl/feedblSpec.coffee
index c77922574..0303dd4c1 100644
--- a/js/tests/services/bl/feedblSpec.coffee
+++ b/js/tests/services/bl/feedblSpec.coffee
@@ -321,3 +321,20 @@ describe 'FeedBl', ->
expect(@FeedModel.size()).toBe(0)
expect(@FeedModel.getByUrlHash('john')).toBe(undefined)
+
+ it 'should update all feeds', =>
+ @persistence.updateFeed = jasmine.createSpy('update')
+ @FeedModel.add({id: 3, urlHash: 'john'})
+
+ @FeedBl.updateFeeds()
+
+ expect(@persistence.updateFeed).toHaveBeenCalledWith(3)
+
+
+ it 'should not update feeds without ids', =>
+ @persistence.updateFeed = jasmine.createSpy('update')
+ @FeedModel.add({urlHash: 'john'})
+
+ @FeedBl.updateFeeds()
+
+ expect(@persistence.updateFeed).not.toHaveBeenCalled() \ No newline at end of file