diff options
Diffstat (limited to 'js/tests/services/showallSpec.coffee')
-rw-r--r-- | js/tests/services/showallSpec.coffee | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/js/tests/services/showallSpec.coffee b/js/tests/services/showallSpec.coffee index 65c163ccf..7eba354f4 100644 --- a/js/tests/services/showallSpec.coffee +++ b/js/tests/services/showallSpec.coffee @@ -27,16 +27,23 @@ describe '_ShowAll', -> beforeEach module 'News' beforeEach inject (@_ShowAll) => + @showAll = new @_ShowAll() it 'should be false by default', => - showAll = new @_ShowAll() + - expect(showAll.getShowAll()).toBeFalsy() + expect(@showAll.getShowAll()).toBeFalsy() it 'should set the correct showAll value', => - showAll = new @_ShowAll() - showAll.handle(true) + @showAll.handle(true) + expect(@showAll.getShowAll()).toBeTruthy() - expect(showAll.getShowAll()).toBeTruthy()
\ No newline at end of file + + it 'should provide a set showall setter', => + @showAll.setShowAll(true) + expect(@showAll.getShowAll()).toBeTruthy() + + @showAll.setShowAll(false) + expect(@showAll.getShowAll()).toBeFalsy() |