From eacd49cf7240b6a4660767950e9974ce064ce18c Mon Sep 17 00:00:00 2001
From: Duda Dornelles <ddornell@thoughtworks.com>
Date: Wed, 1 Oct 2014 11:03:15 -0300
Subject: Fixing "flaky" js tests: when spying on teardown and not calling it
 through we were ending up with a component in memory that was blowing up the
 next tests

---
 web-ui/test/spec/tags/ui/tag_shortcut.spec.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'web-ui')

diff --git a/web-ui/test/spec/tags/ui/tag_shortcut.spec.js b/web-ui/test/spec/tags/ui/tag_shortcut.spec.js
index ba44304e..862e0d1c 100644
--- a/web-ui/test/spec/tags/ui/tag_shortcut.spec.js
+++ b/web-ui/test/spec/tags/ui/tag_shortcut.spec.js
@@ -42,8 +42,8 @@ describeComponent("tags/ui/tag_shortcut", function () {
     var shortcutAddedAfterEmptyingParent = TagShortcut.appendedTo(parent, { linkTo: { name: 'inbox', counts: { total: 15 }}, trigger: component });
     // by now shorcut is not in the DOM anymore but shortcutAddedAfterEmptyingParent is
 
-    spyOn(shortcut, 'teardown');
-    spyOn(shortcutAddedAfterEmptyingParent, 'teardown');
+    spyOn(shortcut, 'teardown').andCallThrough();
+    spyOn(shortcutAddedAfterEmptyingParent, 'teardown').andCallThrough();
 
     $(document).trigger(Pixelated.events.tags.shortcuts.teardown);
 
-- 
cgit v1.2.3