fix more tests

This commit is contained in:
Jason Calabrese
2016-06-07 23:14:44 -07:00
parent 5d0e1f8f63
commit e3d1b58fdc
2 changed files with 2 additions and 10 deletions
-5
View File
@@ -76,13 +76,8 @@ describe('Treatment API', function ( ) {
self.ctx.bus.on('data-loaded', function dataWasLoaded ( ) {
self.ctx.ddata.treatments.length.should.equal(3);
self.ctx.ddata.treatments[0].mgdl.should.equal(100);
should.not.exist(self.ctx.ddata.treatments[0].eventTime);
should.not.exist(self.ctx.ddata.treatments[0].notes);
should.not.exist(self.ctx.ddata.treatments[1].eventTime);
self.ctx.ddata.treatments[1].insulin.should.equal(2);
self.ctx.ddata.treatments[2].carbs.should.equal(30);
//if travis is slow the 2 posts take long enough that 2 data-loaded events are emitted
if (!doneCalled) { done(); }
+2 -5
View File
@@ -6,11 +6,8 @@ var benv = require('benv');
var read = require('fs').readFileSync;
var serverSettings = require('./fixtures/default-server-settings');
var nowData = {
sgvs: [
{ mgdl: 100, mills: Date.now(), direction: 'Flat', type: 'sgv' }
]
};
var nowData = require('../lib/data/ddata')();
nowData.sgvs.push({ mgdl: 100, mills: Date.now(), direction: 'Flat', type: 'sgv' });
var exampleProfile = {
defaultProfile : 'Default'