Permalink
Browse files

Added mv task unit tests #12

  • Loading branch information...
1 parent c0e2eaa commit 679ae7611a03e965b9a6f31b2011807c9e7634c0 @filipediasf filipediasf committed Feb 5, 2013
Showing with 673 additions and 10 deletions.
  1. +6 −6 test/tasks/cp.js
  2. +667 −4 test/tasks/mv.js
View
@@ -458,15 +458,15 @@ module.exports = function (automaton) {
folder = 'folder/',
file = 'file.js',
toCopy = {},
- mode_dir,
- mode_file;
+ modeDir,
+ modeFile;
// create dirs
fs.mkdirSync(dir);
fs.mkdirSync(target + folder);
// get default dir mode
- mode_dir = fs.statSync(target + folder).mode;
+ modeDir = fs.statSync(target + folder).mode;
// change it to something else
fs.chmodSync(target + folder, '0777');
@@ -475,7 +475,7 @@ module.exports = function (automaton) {
fs.writeFileSync(target + file, 'dummy');
// get file mode
- mode_file = fs.statSync(target + file).mode;
+ modeFile = fs.statSync(target + file).mode;
// change it to something else
fs.chmodSync(target + file, '0777');
@@ -491,8 +491,8 @@ module.exports = function (automaton) {
throw err;
}
- expect(fs.statSync(toCopy[target + file] + file).mode).to.equal(mode_file);
- expect(fs.statSync(toCopy[target + folder]).mode).to.equal(mode_dir);
+ expect(fs.statSync(toCopy[target + file] + file).mode).to.equal(modeFile);
+ expect(fs.statSync(toCopy[target + folder]).mode).to.equal(modeDir);
done();
});
});
Oops, something went wrong.

0 comments on commit 679ae76

Please sign in to comment.