Skip to content

Commit 868fa70

Browse files
committed
Update builds.e2e-spec.ts
1 parent 95b43f1 commit 868fa70

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

test/builds.e2e-spec.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,28 @@ describe('Builds (e2e)', () => {
7979
});
8080
});
8181

82+
it('201 by ciBuildId', async () => {
83+
const createBuildDto: CreateBuildDto = {
84+
ciBuildId: 'ciBuildId',
85+
branchName: 'branchName',
86+
project: project.name,
87+
};
88+
const build = await buildsService.create(createBuildDto)
89+
90+
return requestWithApiKey(app, 'post', '/builds', createBuildDto, user.apiKey)
91+
.expect(201)
92+
.expect((res) => {
93+
expect(res.body.id).toBe(build.id);
94+
expect(res.body.ciBuildId).toBe("test");
95+
expect(res.body.projectId).toBe(project.id);
96+
expect(res.body.branchName).toBe(createBuildDto.branchName);
97+
expect(res.body.failedCount).toBe(0);
98+
expect(res.body.passedCount).toBe(0);
99+
expect(res.body.unresolvedCount).toBe(0);
100+
expect(res.body.isRunning).toBe(true);
101+
});
102+
});
103+
82104
it('404', () => {
83105
const createBuildDto: CreateBuildDto = {
84106
branchName: 'branchName',

0 commit comments

Comments
 (0)