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

'use strict';

const { app, assert } = require('egg-mock/bootstrap');
const tenderConst = require('../../../app/const/tender');
describe('test/app/service/tender.test.js', () => {

    it('test getinfo', function* () {
        const ctx = app.mockContext();
        const tenderInfo = yield ctx.service.tender.getDataById(14);
        assert(tenderInfo.id === 14);
        // assert(tenderInfo.name === '测试标段5');
    });

    it('save test',function* () {
        const ctx = app.mockContext();
        const renderbody = {
            name : '测试标段5',
            type : 1
        };
        const result = yield ctx.service.tender.save(renderbody,14);
        assert(result);
    })

});
