diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-12 12:25:58 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-12 12:25:58 +0200 |
commit | e8767f75116ff7ef2b7a349480151c9f66bbade0 (patch) | |
tree | 5879fe01fa8113a299daaba4d2c6cfa84769a104 /js/tests/services/bl/feedblSpec.coffee | |
parent | e9eaa93826c75097d95d21a556e1b1aae6610bcd (diff) |
implement clientside update requests, fix #27
Diffstat (limited to 'js/tests/services/bl/feedblSpec.coffee')
-rw-r--r-- | js/tests/services/bl/feedblSpec.coffee | 17 |
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 |