summaryrefslogtreecommitdiff
path: root/jarmon/jarmon.test.js
diff options
context:
space:
mode:
authorRichard Wall <richard@largo>2010-10-04 00:27:06 +0100
committerRichard Wall <richard@largo>2010-10-04 00:27:06 +0100
commit9c71054a0e3f6e0bb5b524ada9b9c73ca90c2913 (patch)
tree9849f25d5fd981a2d324f71d4170e959898aab18 /jarmon/jarmon.test.js
parente9b1a0b4728d9e74ae3c6dccbf037e07f36f5fd4 (diff)
A test case for the Chart class
Diffstat (limited to 'jarmon/jarmon.test.js')
-rw-r--r--jarmon/jarmon.test.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/jarmon/jarmon.test.js b/jarmon/jarmon.test.js
index 0ff1840..9ae7531 100644
--- a/jarmon/jarmon.test.js
+++ b/jarmon/jarmon.test.js
@@ -276,6 +276,41 @@ YUI({ logInclude: { TestRunner: true } }).use('console', 'test', function(Y) {
}));
+ Y.Test.Runner.add(new Y.Test.Case({
+ name: "jarmon.Chart",
+
+ XsetUp: function() {
+ this.d = new jarmon.downloadBinary('build/test.rrd')
+ .addCallback(
+ function(self, binary) {
+ return new RRDFile(binary);
+ }, this)
+ .addErrback(
+ function(ret) {
+ console.log(ret);
+ });
+ },
+
+ test_draw: function () {
+ /**
+ *
+ **/
+ var $tpl = $('<div><div class="chart"></div></div>').appendTo($('body'));
+ var c = new jarmon.Chart($tpl, {xaxis: {mode: "time"}});
+ //jarmon.Chart.BASE_OPTIONS
+ //c.options.xaxis.tzoffset = 0;
+ c.addData('speed', new jarmon.RrdQueryRemote('build/test.rrd', 'm/s'), true);
+ var d = c.setTimeRange(RRD_STARTTIME, RRD_ENDTIME);
+ d.addCallback(
+ function(self) {
+ self.resume(function() {
+ Y.Assert.areEqual(1, 1);
+ });
+ }, this);
+ this.wait();
+ },
+ }));
+
//initialize the console
var yconsole = new Y.Console({