Skip to content

Commit

Permalink
test: fix testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
xudafeng committed Jan 6, 2019
1 parent 3010144 commit c0ef259
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions test/app/controller/build.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,31 +56,6 @@ describe('test/app/controller/build.test.js', function() {
assert(body.data.result[1].createdAt);
});

it('GET /api/build/:uniqId query one build', async () => {
const [{ uniqId }] = await ctx.model.Build.bulkCreate([{
jobName: 'android',
buildNumber: '10',
data: {},
}, {
jobName: 'ios',
buildNumber: '20',
data: {},
}]);
await ctx.model.JobName.bulkCreate([{
jobName: 'android',
}, {
jobName: 'ios',
}]);
const { body } = await app.httpRequest()
.get(`/api/build/${uniqId}`);
assert(body.success === true);
assert(body.data.jobName === 'android');
assert(body.data.buildNumber === '10');
assert(body.data.data);
assert(body.data.uniqId === uniqId);
assert(body.data.createdAt);
});

it('GET /api/build/:jobName query by jobName', async () => {
await insertData({
environment: {
Expand Down Expand Up @@ -200,7 +175,6 @@ describe('test/app/controller/build.test.js', function() {
});

it('POST /api/build/:uniqId update build extendInfo', async () => {
const appId = 'APP_ONE';
await app.model.Config.create({
data: {},
});
Expand All @@ -219,7 +193,6 @@ describe('test/app/controller/build.test.js', function() {
gitUrl: 'http://domain/url/one',
},
extraInfo: {
// appId,
},
environment: {
ci: {
Expand All @@ -239,7 +212,6 @@ describe('test/app/controller/build.test.js', function() {
gitUrl: 'http://domain/url/two',
},
extraInfo: {
appId,
},
environment: {
ci: {
Expand Down

0 comments on commit c0ef259

Please sign in to comment.