[Layout] Update specs

Update specs to reflect changes made to the manner in
which a view may persist view configuration changes,
for WTD-535.
This commit is contained in:
Victor Woeltjen
2014-12-06 09:45:41 -08:00
parent 3f41dc716f
commit b1f8a54dab
3 changed files with 27 additions and 21 deletions

View File

@ -91,6 +91,25 @@ define(
// that a configuration for b has been defined.
expect(testConfiguration.panels.b).toBeDefined();
});
it("invokes commit after drag", function () {
// Populate scope
mockScope.$watch.mostRecentCall.args[1](testModel);
// Add a commit method to scope
mockScope.commit = jasmine.createSpy("commit");
// Do a drag
controller.startDrag("b", [1, 1], [0, 0]);
controller.continueDrag([100, 100]);
controller.endDrag();
// Should have triggered commit (provided by
// EditRepresenter) with some message.
expect(mockScope.commit)
.toHaveBeenCalledWith(jasmine.any(String));
});
});
}
);