[Entanglement] Verify revalidation
Verify that move/copy/link revalidate when performed and throw errors when moving/copying/linking would be invalid. nasa/openmctweb#98
This commit is contained in:
@@ -196,6 +196,17 @@ define(
|
||||
.toHaveBeenCalledWith(jasmine.any(Function));
|
||||
});
|
||||
|
||||
it("throws an expection when performed on invalid inputs", function () {
|
||||
function perform() {
|
||||
moveService.perform(object, newParent);
|
||||
}
|
||||
|
||||
policyService.allow.andReturn(true);
|
||||
expect(perform).not.toThrow();
|
||||
policyService.allow.andReturn(false); // Cause validate to fail
|
||||
expect(perform).toThrow();
|
||||
});
|
||||
|
||||
describe("when moving an original", function () {
|
||||
beforeEach(function () {
|
||||
locationCapability.getContextualLocation
|
||||
|
||||
Reference in New Issue
Block a user