var generateBasenameLink = require('../../../../task/worker/generate_basename_link'),
    testResource = require('../../../test_resource');

exports.setUp = function (done) {
    process.env.TASK_LOG_DISABLED = true;
    done();
};
exports.tearDown = function (done) {
    process.env.TASK_LOG_DISABLED = false;
    done();
};


exports['Generate a basename link'] = function (test) {
    var workDir = testResource.resolveWorkFile('work_generate_basename_link');
    testResource.prepareCleanWorkDir(workDir, function () {
        generateBasenameLink({
            src: testResource.resolveMockFile('mock-data.json'),
            linkDir: workDir
        }, function (err) {
            test.ifError(err);
            test.done();
        });
    });
};

