mirror of
https://github.com/nasa/openmct.git
synced 2025-05-08 11:38:35 +00:00
#338 fixed failing test
This commit is contained in:
parent
f8099550bd
commit
6aa77ff468
@ -203,10 +203,6 @@ define(
|
|||||||
CopyTask.prototype.perform = function(){
|
CopyTask.prototype.perform = function(){
|
||||||
this.deferred = this.$q.defer();
|
this.deferred = this.$q.defer();
|
||||||
|
|
||||||
if (!this.parent.hasCapability('composition')){
|
|
||||||
return this.$q.reject();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.buildCopyPlan()
|
this.buildCopyPlan()
|
||||||
.then(persistObjects)
|
.then(persistObjects)
|
||||||
.then(addClonesToParent)
|
.then(addClonesToParent)
|
||||||
|
@ -412,15 +412,23 @@ define(
|
|||||||
object = domainObjectFactory({
|
object = domainObjectFactory({
|
||||||
name: 'object',
|
name: 'object',
|
||||||
capabilities: {
|
capabilities: {
|
||||||
type: { type: 'object' }
|
type: { type: 'object' },
|
||||||
|
location: locationCapability,
|
||||||
|
persistence: persistenceCapability
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
newParent = domainObjectFactory({
|
newParent = domainObjectFactory({
|
||||||
name: 'parentCandidate',
|
name: 'parentCandidate',
|
||||||
capabilities: {
|
capabilities: {
|
||||||
type: { type: 'parentCandidate' }
|
type: { type: 'parentCandidate' },
|
||||||
|
instantiation: instantiationCapability,
|
||||||
|
composition: compositionCapability,
|
||||||
|
persistence: persistenceCapability
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
instantiationCapability.invoke.andReturn(object);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("throws an error", function () {
|
it("throws an error", function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user