Permalink
Browse files

add some tests

  • Loading branch information...
1 parent 0df7fd5 commit ee2077e851a35615e5b28df069f8d6732be630c7 @Devon-Olivier committed Jan 4, 2013
Showing with 20 additions and 1 deletion.
  1. +20 −1 tests/nlcb-lotto.js
View
@@ -1,7 +1,27 @@
var DRIVERS = require('../argent-drivers.js');
+var moment = DRIVERS.moment;
console.log(DRIVERS);
+dbConfig = {
+ 'database': 'mongo',
+ 'address': 'localhost:27017/lottoplus?auto_reconnect',
+ 'username': null,
+ 'password': null
+};
+
var lottoplusNlcbDriver = DRIVERS.lottoplus.nlcb.createDriver();
+var lottoplusMongoDriver = DRIVERS.lottoplus.mongo.createDriver(dbConfig);
+
+lottoplusMongoDriver.getDrawDate(moment('2012 12 2'), function drawNumberCallback(error, draw){
+ if(error !== null){
+ console.log(error);
+ lottoplusMongoDriver.close(function(){});
+ return;
+ }
+ console.log(draw);
+ lottoplusMongoDriver.close(function(){});
+});
+
console.log(lottoplusNlcbDriver);
lottoplusNlcbDriver.getDrawNumberRange({start:1, end:2}, function drawNumberRangeCallback(error, draws){
if(error !== null){
@@ -11,7 +31,6 @@ lottoplusNlcbDriver.getDrawNumberRange({start:1, end:2}, function drawNumberRang
console.log(draws);
});
-var moment = DRIVERS.moment;
var range = {
start: moment('2012 12 1', 'YYYY MM DD'),
end: moment('2013 1 1', 'YYYY MM DD')

0 comments on commit ee2077e

Please sign in to comment.