summaryrefslogtreecommitdiffstats
path: root/js/tests
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2013-12-19 17:47:10 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2013-12-19 17:47:10 +0100
commit015fbb80fcbdf942dc42efe9f1edb53a71a1b9f8 (patch)
tree287d78cc5159a403436dde80a977d5054c015bd6 /js/tests
parent41bf672b4f3878f99b6248ef2567565c21c2d276 (diff)
add compact view, fix #267, merry christmas ;D
Diffstat (limited to 'js/tests')
-rw-r--r--js/tests/controllers/itemcontrollerSpec.coffee13
1 files changed, 12 insertions, 1 deletions
diff --git a/js/tests/controllers/itemcontrollerSpec.coffee b/js/tests/controllers/itemcontrollerSpec.coffee
index 955f9fe16..03b6bbc2e 100644
--- a/js/tests/controllers/itemcontrollerSpec.coffee
+++ b/js/tests/controllers/itemcontrollerSpec.coffee
@@ -189,4 +189,15 @@ describe 'ItemController', ->
it 'should bind the compact object', =>
expect(@scope.isCompactView()).toBe(false)
@Compact.handle(true)
- expect(@scope.isCompactView()).toBe(true) \ No newline at end of file
+ expect(@scope.isCompactView()).toBe(true)
+
+
+ it 'should toggle active ones and close old ones', =>
+ expect(@scope.is.active).toBe(0)
+
+ @scope.toggleOpen(3)
+ expect(@scope.is.active).toBe(3)
+
+ @scope.toggleOpen(3)
+ expect(@scope.is.active).toBe(0)
+