/** @overview nodeunit test case. */

var fs = require('fs'),
    testResource = require('../../../test_resource'),
    generateIcoImage = require('../../../../task/worker/generate_ico_image.js');

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

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


exports['Generate ico image.'] = function (test) {
    var dest = testResource.resolveWorkFile('work-img.ico');
    generateIcoImage({
        src: testResource.resolveMockFile('mock-img.png'),
        dest: dest
    }, function (err) {
        test.ifError(err);
        fs.exists(dest, function (exists) {
            test.ok(exists);
            test.done();
        });
    });
};