[Timeline] Test MCTResourceGraphDrop's dragleave handler

This commit is contained in:
Victor Woeltjen 2017-10-30 12:44:51 -07:00
parent 717fa5edf4
commit 04f47b3db6

View File

@ -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();
});
});
});
});