docparse-supplier-nge
Version:
process ngrid electric utility bill data for use in the docparse system
31 lines (29 loc) • 820 B
JavaScript
var inspect = require('eyespect').inspector();
var should = require('should');
var path = require('path');
var saveData = require('../lib/saveData');
describe('Create Bill', function() {
this.slow('1s');
it('should create bill with default parameters', function(done) {
var bill = {};
var getDates = function (data, cb) {
cb(null, ['2011 01 19, 2011 02 19']);
};
var createInvoices = function (data, cb) {
cb(null, {});
};
var createBill = function (data, cb) {
cb();
};
var data = {
getDates: getDates,
createInvoices: createInvoices,
createBill: createBill
};
saveData(data, function (err, reply) {
should.not.exist(err);
should.exist(reply, 'no bill object returned from createBill module');
done();
});
});
});