summaryrefslogtreecommitdiff
path: root/jarmon/jarmon.test.js
diff options
context:
space:
mode:
authorRichard Wall <richard@aziz>2010-08-25 22:20:41 +0100
committerRichard Wall <richard@aziz>2010-08-25 22:20:41 +0100
commit64f965d74374f3a15342bf6e807ac50513a69f68 (patch)
tree1991e3e801cb2cfd24601f28e9bc220e011796ab /jarmon/jarmon.test.js
parenta741b9e561512e258fe4a589ac074c548eb37e3a (diff)
Add a test for query timerange
Diffstat (limited to 'jarmon/jarmon.test.js')
-rw-r--r--jarmon/jarmon.test.js30
1 files changed, 23 insertions, 7 deletions
diff --git a/jarmon/jarmon.test.js b/jarmon/jarmon.test.js
index 4a5c273..86243b4 100644
--- a/jarmon/jarmon.test.js
+++ b/jarmon/jarmon.test.js
@@ -8,12 +8,6 @@ YUI({ logInclude: { TestRunner: true } }).use('console', 'test', function(Y) {
Y.Test.Runner.add(new Y.Test.Case({
name: "jarmon.downloadBinary",
- setUp : function () {
- },
-
- tearDown : function () {
- },
-
test_urlNotFound: function () {
/**
* When url cannot be found, the deferred should errback with status
@@ -46,10 +40,32 @@ YUI({ logInclude: { TestRunner: true } }).use('console', 'test', function(Y) {
}, this);
this.wait();
- },
+ }
}));
+
+ Y.Test.Runner.add(new Y.Test.Case({
+ name: "jarmon.RrdQuery",
+
+ test_getDataTimeRangeOverlapError: function () {
+ /**
+ * The starttime must be less than the endtime
+ **/
+ var rq = new jarmon.RrdQuery({}, '');
+ var error = null;
+ try {
+ rq.getData(1, 0);
+ } catch(e) {
+ error = e;
+ }
+ Y.Assert.isInstanceOf(jarmon.TimeRangeError, error);
+ }
+
+ }));
+
+
+
//initialize the console
var yconsole = new Y.Console({
newestOnTop: false,