/* 
 test.calendar.js
 TODO event test
 */

/* ax5.calendar.setConfig */
describe('ax5.palette TEST', function () {
    var myPalette;
    var tmpl = '<div data-ax5palette="01" style="' +
        'width:300px;"></div>';

    $(document.body).append(tmpl);

    it('check palette type', function (done) {
        done(typeof new ax5.ui.palette() == "object" ? "" : "check type error");
    });

    it('palette setConfig', function (done) {
        myPalette = new ax5.ui.palette();
        myPalette.setConfig({
            target: $('[data-ax5palette="01"]'),
            onClick: function () {
                alert('success');
            }
        });

        done();
    });

    it('palette setSelectedColor', function (done) {
        var color = "4a0066";
        setTimeout(function () {
            done(myPalette.setSelectedColor(color).colors[5]._selectedColor == color ? "" : "setSelectedColor error");
        }, myPalette.config.animateTime);
    });
});
@@ -707,16 +707,319 @@
 tedColor
+ on red', function (done) %7B%0A        var color = %22ff4b4b%22;%0A        setTimeout(function () %7B%0A            done(myPalette.setSelectedColor(color).colors%5B0%5D._selectedColor == color ? %22%22 : %22setSelectedColor error%22);%0A        %7D, myPalette.config.animateTime);%0A    %7D);%0A%0A    it('palette setSelectedColor on purple
 ', funct

update test code