Skip to content

Commit

Permalink
added basic bwp pill text
Browse files Browse the repository at this point in the history
  • Loading branch information
jasoncalabrese committed Jul 9, 2015
1 parent 9232902 commit d53736c
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/boluswizardpreview.test.js
Expand Up @@ -106,4 +106,37 @@ describe('boluswizardpreview', function ( ) {

});

it('set a pill to the BWP with infos', function (done) {
var pluginBase = {
updatePillText: function mockedUpdatePillText (plugin, options) {
options.label.should.equal('BWP');
options.value.should.equal('0.50U');
done();
}
};

var app = { };
var clientSettings = {};

var loadedProfile = require('../lib/profilefunctions')();
loadedProfile.loadData([profile]);

var data = {
sgvs: [{x: before, y: 295}, {x: now, y: 300}]
, treatments: [{created_at: before, insulin: '1.5'}]
, profile: loadedProfile
};

var sbx = require('../lib/sandbox')().clientInit(app, clientSettings, Date.now(), pluginBase, data);

iob.setProperties(sbx);
boluswizardpreview.setProperties(sbx);
boluswizardpreview.updateVisualisation(sbx);

ctx.notifications.resetStateForTests();
ctx.notifications.initRequests();
ctx.data.profiles = [profile];

});

});

0 comments on commit d53736c

Please sign in to comment.