summaryrefslogtreecommitdiffstats
path: root/js/tests
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-08 15:23:06 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-08 15:23:06 +0200
commite6d926de620a470a487010f02b47e3932512db93 (patch)
tree36811b84a47fb74e8bda708c4bdacbc7d5e110c5 /js/tests
parente2381ea22cfd3fc1ab6b6c8e472740005ad02f87 (diff)
add link to feed which gets opened when clicked on the subheading of an item
Diffstat (limited to 'js/tests')
-rw-r--r--js/tests/controllers/itemcontrollerSpec.coffee9
-rw-r--r--js/tests/services/bl/feedblSpec.coffee14
2 files changed, 20 insertions, 3 deletions
diff --git a/js/tests/controllers/itemcontrollerSpec.coffee b/js/tests/controllers/itemcontrollerSpec.coffee
index 35aff7141..f95f4a459 100644
--- a/js/tests/controllers/itemcontrollerSpec.coffee
+++ b/js/tests/controllers/itemcontrollerSpec.coffee
@@ -28,13 +28,18 @@ describe '_ItemController', ->
beforeEach inject (@_ItemController, @ActiveFeed, @ShowAll, @FeedType,
@StarredCount, @FeedModel, @FolderModel, @ItemModel,
- @ItemBl) =>
+ @ItemBl, @FeedBl, @FeedLoading) =>
@scope = {}
@persistence = {
getItems: ->
}
- @controller = new @_ItemController(@scope, @ItemBl, @FeedModel)
+ @controller = new @_ItemController(@scope, @ItemBl, @FeedModel,
+ @FeedLoading, @FeedBl)
it 'should make ItemBl availabe', =>
expect(@scope.itemBl).toBe(@ItemBl)
+
+
+ it 'should make FeedBl availabe', =>
+ expect(@scope.feedBl).toBe(@FeedBl)
diff --git a/js/tests/services/bl/feedblSpec.coffee b/js/tests/services/bl/feedblSpec.coffee
index 70d0c6e8b..c8ba1ec34 100644
--- a/js/tests/services/bl/feedblSpec.coffee
+++ b/js/tests/services/bl/feedblSpec.coffee
@@ -201,4 +201,16 @@ describe 'FeedBl', ->
folders = @FeedBl.getFeedsOfFolder(3)
expect(folders).toContain(item1)
- expect(folders).toContain(item3) \ No newline at end of file
+ expect(folders).toContain(item3)
+
+
+ it 'should return the correct feed link', =>
+ item2 =
+ id: 4,
+ unreadCount:134,
+ urlHash: 'a2',
+ folderId: 3,
+ link: 'test.com'
+ @FeedModel.add(item2)
+
+ expect(@FeedBl.getFeedLink(4)).toBe('test.com') \ No newline at end of file