summaryrefslogtreecommitdiffstats
path: root/js/tests/services/businesslayer/itembusinesslayerSpec.coffee
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-16 13:19:28 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-16 15:23:12 +0200
commit8df6d36d49d89f3bb7186b36436606adb039b3f8 (patch)
tree2fbbe1e55995d0f9277557838a25f351e371540e /js/tests/services/businesslayer/itembusinesslayerSpec.coffee
parentefc118431b6afbb7cc1df887e11195d8c7e761a7 (diff)
move instantiation into file where object is declared, fix unittests that overwrote services for all unittests and caused them to fail
Diffstat (limited to 'js/tests/services/businesslayer/itembusinesslayerSpec.coffee')
-rw-r--r--js/tests/services/businesslayer/itembusinesslayerSpec.coffee10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/tests/services/businesslayer/itembusinesslayerSpec.coffee b/js/tests/services/businesslayer/itembusinesslayerSpec.coffee
index 0bc8a3188..d5333c1f4 100644
--- a/js/tests/services/businesslayer/itembusinesslayerSpec.coffee
+++ b/js/tests/services/businesslayer/itembusinesslayerSpec.coffee
@@ -26,14 +26,16 @@ describe 'ItemBusinessLayer', ->
beforeEach module 'News'
- beforeEach =>
- angular.module('News').factory 'Persistence', =>
- @persistence = {}
-
+ beforeEach module ($provide) =>
+ @persistence = {}
+ $provide.value 'Persistence', @persistence
+ return
+
beforeEach inject (@ItemModel, @ItemBusinessLayer, @StatusFlag, @ActiveFeed
@FeedType, @FeedModel, @StarredBusinessLayer) =>
@item1 = {id: 5, title: 'hi', unreadCount:134, urlHash: 'a3', folderId: 3}
@FeedModel.add(@item1)
+
it 'should return all items', =>