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