From 7cd6cb103916ee0843be7b8807fb63bbbd9cfa80 Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Thu, 1 May 2014 22:33:23 +0200 Subject: [PATCH] modalview specs added --- .../aardvark/test/specs/views/modalViewSpec.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/js/apps/system/aardvark/test/specs/views/modalViewSpec.js b/js/apps/system/aardvark/test/specs/views/modalViewSpec.js index ace3fcd357..e3e6f158ea 100644 --- a/js/apps/system/aardvark/test/specs/views/modalViewSpec.js +++ b/js/apps/system/aardvark/test/specs/views/modalViewSpec.js @@ -390,5 +390,20 @@ expect(testee.delegateEvents).toHaveBeenCalled(); }); + it("should call keyboard bind function", function() { + spyOn(testee, "createModalHotkeys"); + testee.enabledHotkey = false; + testee.show("modalTable.ejs", "Delegate Events", undefined, undefined, undefined, undefined); + expect(testee.createModalHotkeys).toHaveBeenCalled(); + + }); + + it("should not call keyboard bind function", function() { + spyOn(testee, "createModalHotkeys"); + testee.enabledHotkey = true; + testee.show("modalTable.ejs", "Delegate Events", undefined, undefined, undefined, undefined); + expect(testee.createModalHotkeys).not.toHaveBeenCalled(); + }); + }); }());