/** @overview nodeunit test case. */

var testResource = require('../../../test_resource'),
    publishStaticFiles = require('../../../../task/worker/publish_static_files.js');

exports.setUp = function (done) {
    done();
};

exports.tearDown = function (done) {
    done();
};


exports['Publish static files.'] = function (test) {
    var destDir = testResource.resolveWorkFile('work_publish_static_files');
    testResource.prepareCleanWorkDir(destDir, function () {
        publishStaticFiles({
            srcDir: testResource.resolveMockFile('.'),
            pattern: '*.json',
            destDir: destDir
        }, function (err) {
            test.ifError(err);
            test.done();
        });
    });
};