/**
 * 项目数据模型单元测试
 *
 * @author CaiAoLin
 * @date 2017/11/17
 * @version
 */

'use strict';

const { app, assert } = require('egg-mock/bootstrap');

describe('test/app/service/project.test.js', () => {

    it('not exist code', function* () {
        const ctx = app.mockContext();
        const projectData = yield ctx.service.project.getProjectByCode('1111');
        assert(projectData === null);
    });

    it('exist code', function* () {
        const ctx = app.mockContext();
        const projectData = yield ctx.service.project.getProjectByCode('J201711163164');
        assert(projectData.id === 16);
    });

});
