Skip to content

Commit

Permalink
Fixed a wrong test when a move is made by copy in the 'ResourceTester…
Browse files Browse the repository at this point in the history
…' class
  • Loading branch information
AdrienCastex committed Jun 20, 2017
1 parent 2bb7a4b commit 1b5e3a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions lib/resource/std/resourceTester/Actions.js
Original file line number Diff line number Diff line change
@@ -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);
Expand Down Expand Up @@ -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')
}*/);
});
});
});
Expand Down
5 changes: 3 additions & 2 deletions src/resource/std/resourceTester/Actions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ResourceTesterTestCallback } from './Types'
import { StandardResource } from '../../std/StandardResource'
import { VirtualFolder } from '../../virtual/VirtualFolder'

// ****************************** Actions ****************************** //
Expand Down Expand Up @@ -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')
})
}*/)
})
})
})
Expand Down

0 comments on commit 1b5e3a1

Please sign in to comment.