#338 fixed failing test

This commit is contained in:
Henry 2015-12-03 16:41:06 -08:00
parent f8099550bd
commit 6aa77ff468
2 changed files with 10 additions and 6 deletions

View File

@ -203,10 +203,6 @@ define(
CopyTask.prototype.perform = function(){
this.deferred = this.$q.defer();
if (!this.parent.hasCapability('composition')){
return this.$q.reject();
}
this.buildCopyPlan()
.then(persistObjects)
.then(addClonesToParent)

View File

@ -412,15 +412,23 @@ define(
object = domainObjectFactory({
name: 'object',
capabilities: {
type: { type: 'object' }
type: { type: 'object' },
location: locationCapability,
persistence: persistenceCapability
}
});
newParent = domainObjectFactory({
name: 'parentCandidate',
capabilities: {
type: { type: 'parentCandidate' }
type: { type: 'parentCandidate' },
instantiation: instantiationCapability,
composition: compositionCapability,
persistence: persistenceCapability
}
});
instantiationCapability.invoke.andReturn(object);
});
it("throws an error", function () {