From 1b5e3a19df86f6ce766bd2e6161de075a175b68a Mon Sep 17 00:00:00 2001 From: Adrien Castex Date: Tue, 20 Jun 2017 14:37:11 +0200 Subject: [PATCH] Fixed a wrong test when a move is made by copy in the 'ResourceTester' class --- lib/resource/std/resourceTester/Actions.js | 7 ++++--- src/resource/std/resourceTester/Actions.ts | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/resource/std/resourceTester/Actions.js b/lib/resource/std/resourceTester/Actions.js index bcb3da66..10808bcb 100644 --- a/lib/resource/std/resourceTester/Actions.js +++ b/lib/resource/std/resourceTester/Actions.js @@ -1,6 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var VirtualFolder_1 = require("../../virtual/VirtualFolder"); +// ****************************** Actions ****************************** // function create(callback) { var _this = this; callback = this.multiple(callback, 1); @@ -49,9 +50,9 @@ function moveTo(callback) { vf1.addChild(r1, function (e) { callback(e, !e, 'addChild error of VirtualFolder', undefined, function () { r1.moveTo(vf2, 'newName', false, function (e) { - callback(e, !e, 'moveTo must fail', undefined, function () { - callback(null, r1.parent === vf2, 'The parent property of the resource must be changed'); - }); + callback(e, !e, 'moveTo must not fail' /*, undefined, () => { + callback(null, r1.parent === vf2, 'The parent property of the resource must be changed') + }*/); }); }); }); diff --git a/src/resource/std/resourceTester/Actions.ts b/src/resource/std/resourceTester/Actions.ts index f0ce2c36..96b0b462 100644 --- a/src/resource/std/resourceTester/Actions.ts +++ b/src/resource/std/resourceTester/Actions.ts @@ -1,4 +1,5 @@ import { ResourceTesterTestCallback } from './Types' +import { StandardResource } from '../../std/StandardResource' import { VirtualFolder } from '../../virtual/VirtualFolder' // ****************************** Actions ****************************** // @@ -56,9 +57,9 @@ export function moveTo(callback : ResourceTesterTestCallback) vf1.addChild(r1, (e) => { callback(e, !e, 'addChild error of VirtualFolder', undefined, () => { r1.moveTo(vf2, 'newName', false, (e) => { - callback(e, !e, 'moveTo must fail', undefined, () => { + callback(e, !e, 'moveTo must not fail'/*, undefined, () => { callback(null, r1.parent === vf2, 'The parent property of the resource must be changed') - }) + }*/) }) }) })