[Edit] Update tests

Update tests for Edit mode bundle to include the
general-purpose selection API, WTD-929.
This commit is contained in:
Victor Woeltjen
2015-03-03 18:43:26 -08:00
parent ea37c636ee
commit d7e962e4b1
4 changed files with 93 additions and 14 deletions

View File

@@ -77,9 +77,9 @@ define(
});
// Update the selection
mockScope.selection.push(testObject);
mockScope.selection.select(testObject);
expect(mockScope.$watchCollection.mostRecentCall.args[0])
.toEqual('selection'); // Make sure we're using right watch
.toEqual('selection.all()'); // Make sure we're using right watch
mockScope.$watchCollection.mostRecentCall.args[1]([testObject]);
// Update the state
@@ -105,9 +105,9 @@ define(
});
// Update the selection
mockScope.selection.push(testObject);
mockScope.selection.select(testObject);
expect(mockScope.$watchCollection.mostRecentCall.args[0])
.toEqual('selection'); // Make sure we're using right watch
.toEqual('selection.all()'); // Make sure we're using right watch
mockScope.$watchCollection.mostRecentCall.args[1]([testObject]);
// Invoke the first watch (assumed to be for toolbar state)