Skip to content

Commit 853d41f

Browse files
committed
test
1 parent 637813b commit 853d41f

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/builds/builds.controller.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ export class BuildsController {
8989
@UseGuards(MixedGuard, RoleGuard)
9090
@Roles(Role.admin, Role.editor)
9191
update(@Param('id', new ParseUUIDPipe()) id: string, @Body() modifyBuildDto?: ModifyBuildDto): Promise<BuildDto> {
92-
//In future, no or empty body will do nothing as this check will be removed. It will expect a proper body to perform any patch.
93-
if (modifyBuildDto == null || Object.keys(modifyBuildDto).length === 0) {
94-
modifyBuildDto = { isRunning: false };
95-
}
9692
return this.buildsService.update(id, modifyBuildDto);
9793
}
9894

test/builds.e2e-spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ describe('Builds (e2e)', () => {
258258
const build = await buildsController.create({ project: project.id, branchName: 'develop' });
259259

260260
return requestWithAuth(app, 'patch', `/builds/${build.id}`, user.token)
261-
.send()
261+
.send({isRunning: false})
262262
.expect(200)
263263
.expect((res) => {
264264
expect(res.body.isRunning).toBe(false);
@@ -269,7 +269,7 @@ describe('Builds (e2e)', () => {
269269
const build = await buildsController.create({ project: project.id, branchName: 'develop' });
270270

271271
return requestWithApiKey(app, 'patch', `/builds/${build.id}`, user.apiKey)
272-
.send()
272+
.send({isRunning: false})
273273
.expect(200)
274274
.expect((res) => {
275275
expect(res.body.isRunning).toBe(false);

0 commit comments

Comments
 (0)