/** * * author: Sand * since: 12/13/2016 */ "use strict"; var assert = require('assert'); var redis = require('redis'); var Users = require('../../../../src/server/models/user/users'); describe('Users class', function () { describe('isPatientId', function () { it('true with really patient id', function (done) { let users = new Users(); users.isPatientIdAsync('915cc456-5b1d-11e6-8344-fa163e8aee56').then(function (res) { assert.strictEqual(res, true); done(); }); }); it('false with random id', function (done) { let users = new Users(); users.isPatientIdAsync('not-patient_id').then(function (res) { assert.strictEqual(res, false); done(); }); }) }); describe('getUser', function () { it('should return user info', function (done) { let users = new Users(); users.getUserAsync('test00000000006').then(function (res) { assert.notStrictEqual(res, null); if(res !== null) console.log(res); done(); }); }); }); });