diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-26 19:30:27 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-26 19:30:27 +0100 |
commit | f7c819938067fb6a81822f26943a5c136643a1f7 (patch) | |
tree | aa6663df5cce7a7bbb46aad728df033706d88991 /js/tests | |
parent | eff408710b708a44cf3869599985fd8246c0400b (diff) |
viewing the first 20 items is now possible
Diffstat (limited to 'js/tests')
-rw-r--r-- | js/tests/controllers/itemcontrollerSpec.coffee | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/js/tests/controllers/itemcontrollerSpec.coffee b/js/tests/controllers/itemcontrollerSpec.coffee index 32d6651a7..02682214f 100644 --- a/js/tests/controllers/itemcontrollerSpec.coffee +++ b/js/tests/controllers/itemcontrollerSpec.coffee @@ -24,4 +24,18 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. describe '_ItemController', -> - beforeEach module 'News'
\ No newline at end of file + beforeEach module 'News' + + beforeEach inject (@_ItemController, @ActiveFeed, @ShowAll, @FeedType, + @StarredCount, @FeedModel, @FolderModel, @ItemModel) => + @scope = {} + @persistence = { + getItems: -> + } + @controller = new @_ItemController(@scope, @ItemModel) + + it 'should make items availabe', => + @ItemModel.getAll = jasmine.createSpy('ItemModel') + new @_ItemController(@scope, @ItemModel) + + expect(@ItemModel.getAll).toHaveBeenCalled() |