diff options
Diffstat (limited to 'js/tests')
-rw-r--r-- | js/tests/services/businesslayer/feedbusinesslayerSpec.coffee | 18 | ||||
-rw-r--r-- | js/tests/services/persistenceSpec.coffee | 11 |
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: |