[Fixed Position] Update specs

Update failing specs after changes for WTD-881.
This commit is contained in:
Victor Woeltjen
2015-02-24 09:07:57 -08:00
parent 307fbe2151
commit 8452b2ab12
3 changed files with 8 additions and 13 deletions

View File

@@ -35,7 +35,7 @@ define(
});
it("exposes toolbar state under a attr-defined name", function () {
// A strucutre/state object should have been added to the
// A structure/state object should have been added to the
// parent scope under the name provided in the "toolbar"
// attribute
expect(mockScope.$parent.testToolbar).toBeDefined();
@@ -48,18 +48,12 @@ define(
});
it("watches for toolbar state changes", function () {
expect(mockScope.$parent.$watchCollection).toHaveBeenCalledWith(
"testToolbar.state",
expect(mockScope.$watchCollection).toHaveBeenCalledWith(
jasmine.any(Function),
jasmine.any(Function)
);
});
it("stops watching toolbar state when destroyed", function () {
expect(mockUnwatch).not.toHaveBeenCalled();
representer.destroy();
expect(mockUnwatch).toHaveBeenCalled();
});
// Verify a simple interaction between selection state and toolbar
// state; more complicated interactions are tested in EditToolbar.
it("conveys state changes", function () {
@@ -78,7 +72,8 @@ define(
// Update the state
mockScope.$parent.testToolbar.state[0] = 456;
mockScope.$parent.$watchCollection.mostRecentCall.args[1](
// Invoke the first watch (assumed to be for toolbar state)
mockScope.$watchCollection.calls[0].args[1](
mockScope.$parent.testToolbar.state
);