summaryrefslogtreecommitdiffstats
path: root/js/tests
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-20 16:11:56 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-20 16:11:56 +0200
commit43448880561846bf0c71f0b8836500a3cb8017c9 (patch)
tree0ec1e354f1662782e355d3c07cc6a9a0523bec2d /js/tests
parentf15d7d26e51503edc4a41edfdddee92a2aff8a19 (diff)
update all feeds in one go and dont trigger serverside update anymore on feedupdate, fix #90
Diffstat (limited to 'js/tests')
-rw-r--r--js/tests/services/businesslayer/feedbusinesslayerSpec.coffee18
-rw-r--r--js/tests/services/persistenceSpec.coffee11
2 files changed, 11 insertions, 18 deletions
diff --git a/js/tests/services/businesslayer/feedbusinesslayerSpec.coffee b/js/tests/services/businesslayer/feedbusinesslayerSpec.coffee
index 5ac93f25e..d14d50b8d 100644
--- a/js/tests/services/businesslayer/feedbusinesslayerSpec.coffee
+++ b/js/tests/services/businesslayer/feedbusinesslayerSpec.coffee
@@ -329,24 +329,6 @@ describe 'FeedBusinessLayer', ->
expect(@FeedModel.getByUrl('john')).toBe(undefined)
- it 'should update all feeds', =>
- @persistence.updateFeed = jasmine.createSpy('update')
- @FeedModel.add({id: 3, url: 'john'})
-
- @FeedBusinessLayer.updateFeeds()
-
- expect(@persistence.updateFeed).toHaveBeenCalledWith(3)
-
-
- it 'should not update feeds without ids', =>
- @persistence.updateFeed = jasmine.createSpy('update')
- @FeedModel.add({url: 'john'})
-
- @FeedBusinessLayer.updateFeeds()
-
- expect(@persistence.updateFeed).not.toHaveBeenCalled()
-
-
it 'should not import google reader json', =>
@persistence.importGoogleReader = jasmine.createSpy('importGoogleReader')
diff --git a/js/tests/services/persistenceSpec.coffee b/js/tests/services/persistenceSpec.coffee
index 98bd96531..70bcf824f 100644
--- a/js/tests/services/persistenceSpec.coffee
+++ b/js/tests/services/persistenceSpec.coffee
@@ -32,8 +32,13 @@ describe 'Persistence', ->
@config =
itemBatchSize: 3
+ @feedLoading =
+ increase: jasmine.createSpy('feedLoading increase')
+ decrease: jasmine.createSpy('feedLoading decrease')
+
$provide.value 'Request', @req
$provide.value 'Config', @config
+ $provide.value 'FeedLoading', @feedLoading
return
@@ -165,6 +170,12 @@ describe 'Persistence', ->
expect(@req.get).toHaveBeenCalledWith('news_feeds', expected)
+ it 'should not show loading sign if disabled', =>
+ success = ->
+ @Persistence.getAllFeeds(success, false)
+ expect(@feedLoading.increase).not.toHaveBeenCalled()
+
+
it 'create a correct request for moving a feed', =>
params =
data: