var testResource = require('../../../test_resource'),
    generateColorThemesLessFiles = require('../../../../task/worker/generate_color_themes_less_files');

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


exports['Load a color themes template'] = function (test) {
    generateColorThemesLessFiles._loadColorThemesTmpl(function (err, tmpl) {
        test.ifError(err);
        test.ok(tmpl);
        test.done();
    });
};



exports['Generate color themes less.'] = function (test) {
    var destDir = testResource.resolveWorkFile('work_color_themes');
    testResource.prepareCleanWorkDir(destDir, function () {
        generateColorThemesLessFiles({
            destDir: destDir
        }, function (err) {
            test.ifError(err);
            test.done();
        });
    });
};