summaryrefslogtreecommitdiffstats
path: root/js/tests
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-05 23:15:25 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-05 23:15:25 +0200
commit27f34bcb4b774d291c03889024e03bb36b0e19b9 (patch)
tree46cc78548af53f693b3939317de8a0412bca009d /js/tests
parent2d8f76d28f47bc3992c0e86c194fe51427805b54 (diff)
reload page after showall has been changed
Diffstat (limited to 'js/tests')
-rw-r--r--js/tests/services/bl/feedblSpec.coffee9
-rw-r--r--js/tests/services/persistenceSpec.coffee15
2 files changed, 11 insertions, 13 deletions
diff --git a/js/tests/services/bl/feedblSpec.coffee b/js/tests/services/bl/feedblSpec.coffee
index 798fd2e6f..70d0c6e8b 100644
--- a/js/tests/services/bl/feedblSpec.coffee
+++ b/js/tests/services/bl/feedblSpec.coffee
@@ -190,15 +190,6 @@ describe 'FeedBl', ->
expect(@FeedBl.isShowAll()).toBe(true)
- it 'should reload the active feed if showall changed', =>
- @persistence.userSettingsReadShow = jasmine.createSpy('Show All')
- @persistence.userSettingsReadHide = jasmine.createSpy('Hide All')
-
- @FeedBl.setShowAll(true)
-
- expect(@getItemsSpy).toHaveBeenCalledWith(@FeedType.Folder, 0, 0)
-
-
it 'should return all feeds of a folder', =>
item1 = {id: 2, unreadCount:134, urlHash: 'a1', folderId: 3}
item2 = {id: 4, unreadCount:134, urlHash: 'a2', folderId: 2}
diff --git a/js/tests/services/persistenceSpec.coffee b/js/tests/services/persistenceSpec.coffee
index dc36661a4..2934fdfb5 100644
--- a/js/tests/services/persistenceSpec.coffee
+++ b/js/tests/services/persistenceSpec.coffee
@@ -345,14 +345,21 @@ describe '_Persistence', ->
it 'should do a proper user settings read show request', =>
pers = new @_Persistence(@req, @loading, @config, @active, @$rootScope)
- pers.userSettingsReadShow()
+ params =
+ onSuccess: ->
+
+ pers.userSettingsReadShow(params.onSuccess)
- expect(@req.post).toHaveBeenCalledWith('news_usersettings_read_show')
+ expect(@req.post).toHaveBeenCalledWith('news_usersettings_read_show',
+ params)
it 'should do a proper user settings read hide request', =>
pers = new @_Persistence(@req, @loading, @config, @active, @$rootScope)
- pers.userSettingsReadHide()
+ params =
+ onSuccess: ->
+ pers.userSettingsReadHide(params.onSuccess)
- expect(@req.post).toHaveBeenCalledWith('news_usersettings_read_hide') \ No newline at end of file
+ expect(@req.post).toHaveBeenCalledWith('news_usersettings_read_hide',
+ params) \ No newline at end of file