mirror of
https://github.com/nasa/openmct.git
synced 2024-12-23 23:12:23 +00:00
Added test for linking
This commit is contained in:
parent
734e979c94
commit
6aab9f4e34
@ -379,10 +379,28 @@ define(
|
||||
expect(copyFinished).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("returns a promise", function () {
|
||||
expect(copyResult.then).toBeDefined();
|
||||
expect(copyFinished).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it ("correctly locates cloned objects", function() {
|
||||
expect(childObjectClone.getModel().location).toEqual(objectClone.getId());
|
||||
});
|
||||
});
|
||||
describe("when cloning non-creatable objects", function() {
|
||||
beforeEach(function () {
|
||||
policyService.allow.callFake(function(category, object){
|
||||
return category === 'creation';
|
||||
});
|
||||
|
||||
copyResult = copyService.perform(object, newParent);
|
||||
copyFinished = jasmine.createSpy('copyFinished');
|
||||
copyResult.then(copyFinished);
|
||||
});
|
||||
it ("creates links", function() {
|
||||
expect(childObjectClone.getModel().location).toEqual(objectClone.getId());
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user