From 04f47b3db65f809b490b9572faf7f340023c2577 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Mon, 30 Oct 2017 12:44:51 -0700 Subject: [PATCH] [Timeline] Test MCTResourceGraphDrop's dragleave handler --- .../directives/MCTResourceGraphDropSpec.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/platform/features/timeline/test/directives/MCTResourceGraphDropSpec.js b/platform/features/timeline/test/directives/MCTResourceGraphDropSpec.js index e2b09792d9..334c630027 100644 --- a/platform/features/timeline/test/directives/MCTResourceGraphDropSpec.js +++ b/platform/features/timeline/test/directives/MCTResourceGraphDropSpec.js @@ -132,6 +132,25 @@ define( .toHaveBeenCalled(); }); }); + + describe("on dragleave", function () { + beforeEach(function () { + handlers.dragleave(testEvent); + }); + + it("removes any drop-over class", function () { + expect(mockElement.removeClass) + .toHaveBeenCalledWith('drop-over'); + }); + + it("calls $apply on scope", function () { + expect(mockScope.$apply).toHaveBeenCalled(); + }); + + it("calls preventDefault on events", function () { + expect(testEvent.preventDefault).toHaveBeenCalled(); + }); + }); }); });