'use strict';

/**
 *
 *
 * @author EllisRan.
 * @date 2018/4/20
 * @version
 */
const { app, assert } = require('egg-mock/bootstrap');
const libConst = require('../../../app/const/lib');

describe('test/app/service/lib.test.js', () => {
    it('add sql', function* () {
        const ctx = app.mockContext();
        const data = {
            name: 'test',
            path: 'app/public/quotalib/1524216653.sql',
            create_time: '1524216653'
        };
        const libInfo = yield ctx.service.quotaLib.add(data);
        assert(libInfo.affectedRows === 1);
    });

});