diff --git a/platform/commonUI/edit/test/directives/MCTBeforeUnloadSpec.js b/platform/commonUI/edit/test/directives/MCTBeforeUnloadSpec.js new file mode 100644 index 0000000000..1393ff2e64 --- /dev/null +++ b/platform/commonUI/edit/test/directives/MCTBeforeUnloadSpec.js @@ -0,0 +1,23 @@ +/*global define,describe,it,expect,beforeEach,jasmine*/ + +define( + ["../../src/directives/MCTBeforeUnload"], + function (MCTBeforeUnload) { + "use strict"; + + describe("The mct-before-unload directive", function () { + var mockWindow, + directive; + + beforeEach(function () { + mockWindow = {}; + directive = new MCTBeforeUnload(mockWindow); + }); + + it("can be used only as an attribute", function () { + expect(directive.restrict).toEqual('A'); + }); + + }); + } +); \ No newline at end of file diff --git a/platform/commonUI/edit/test/suite.json b/platform/commonUI/edit/test/suite.json index 49fffec4a7..8a239f35b2 100644 --- a/platform/commonUI/edit/test/suite.json +++ b/platform/commonUI/edit/test/suite.json @@ -14,6 +14,7 @@ "controllers/EditActionController", "controllers/EditController", "controllers/EditPanesController", + "directives/MCTBeforeUnload", "objects/EditableDomainObject", "objects/EditableDomainObjectCache", "objects/EditableModelCache",