diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-09-14 02:44:32 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-09-14 02:44:32 +0200 |
commit | bfa090ed5d6fd8fa22487d239d3bb1e0b5e60f69 (patch) | |
tree | 9cc16eb2573fa7a8ff552230b2b9a612720c5474 /js/tests/services/businesslayer | |
parent | df8f6b5fee643c5b2af8e8d33a7865e898518485 (diff) |
dont do pull to refresh when loading in items
Diffstat (limited to 'js/tests/services/businesslayer')
-rw-r--r-- | js/tests/services/businesslayer/businesslayerSpec.coffee | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/js/tests/services/businesslayer/businesslayerSpec.coffee b/js/tests/services/businesslayer/businesslayerSpec.coffee index 433201b25..48be7f0c0 100644 --- a/js/tests/services/businesslayer/businesslayerSpec.coffee +++ b/js/tests/services/businesslayer/businesslayerSpec.coffee @@ -25,7 +25,10 @@ describe 'BusinessLayer', -> beforeEach module 'News' - beforeEach inject (@_BusinessLayer, @ActiveFeed, @FeedType, @ItemModel) => + beforeEach inject (@_BusinessLayer, @ActiveFeed, @FeedType, @ItemModel, + $rootScope) => + @scope = $rootScope.$new() + type = @FeedType.Starred @getItemsSpy = jasmine.createSpy('getItems') @@ -35,11 +38,11 @@ describe 'BusinessLayer', -> class TestBusinessLayer extends @_BusinessLayer - constructor: (activeFeed, persistence, itemModel) -> - super(activeFeed, persistence, itemModel, type) + constructor: (activeFeed, persistence, itemModel, scope) -> + super(activeFeed, persistence, itemModel, type, scope) @BusinessLayer = new TestBusinessLayer(@ActiveFeed, @persistence, - @ItemModel) + @ItemModel, @scope) it 'should reset the item cache when a different feed is being loaded', => @@ -61,7 +64,7 @@ describe 'BusinessLayer', -> @BusinessLayer.load(3) expect(@persistence.getItems).toHaveBeenCalledWith(@FeedType.Starred, 3, - 0) + 0, jasmine.any(Function)) it 'should be active when its selected', => |