1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- /**
- * 患者模型测试。
- *
- * author: Sand
- * since: 2016/11/18
- */
- "use strict";
- var assert = require('assert');
- var Patient = require('../../../../src/server/models/user/patient');
- describe('Patient class', function () {
- describe('Method: sendMessage', function () {
- describe('when send to patient', function () {
- it('should return success', function (done) {
- var patient = new Patient();
- patient.sendMessage({
- startId: 102,
- count: 1,
- records: [
- {
- id: 102,
- from: 'cd914c70-5b06-11e6-8344-fa163e8aee56',
- to: 'shiliuP20160926001',
- contentType: '1',
- content: '您的血小板值偏低,平时有贫血症状吗?',
- timestamp: new Date()
- },
- {
- id: 100,
- from: 'cd914c70-5b06-11e6-8344-fa163e8aee56',
- to: 'shiliuP20160926001',
- contentType: '1',
- content: 'Hello',
- timestamp: new Date()
- }
- ]});
- done();
- });
- });
- });
- });
|