123456789101112131415161718192021222324252627282930313233 |
- /**
- * 项目账号业务逻辑单元测试
- *
- * @author CaiAoLin
- * @date 2017/11/15
- * @version
- */
- 'use strict';
- const { app, assert } = require('egg-mock/bootstrap');
- describe('test/app/service/project_account.test.js', () => {
- it('get account in not exist project', function* () {
- const ctx = app.mockContext();
- ctx.service.projectAccount.searchFilter({});
- const accountList = yield ctx.service.projectAccount.getAccountByProjectId(1000);
- assert(accountList.length === 0);
- });
- it('get account in project', function* () {
- const ctx = app.mockContext();
- ctx.service.projectAccount.searchFilter({});
- const accountList = yield ctx.service.projectAccount.getAccountByProjectId(5);
- assert(accountList.length > 0);
- });
- });
|