Skip to content

Commit 2f745d8

Browse files
committed
fix: fix test change lost in the merge
1 parent 9066df4 commit 2f745d8

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

test/testPush.test.ts

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import request from 'supertest';
2-
import { describe, it, expect, beforeAll, afterAll, afterEach, vi } from 'vitest';
2+
import { afterAll, afterEach, beforeAll, describe, expect, it, vi } from 'vitest';
33
import * as db from '../src/db';
44
import service from '../src/service';
55
import Proxy from '../src/proxy';
@@ -268,7 +268,13 @@ describe('Push API', () => {
268268
await loginAsApprover();
269269
const res = await request(app)
270270
.post(`/api/v1/push/${TEST_PUSH.id}/reject`)
271-
.set('Cookie', `${cookie}`);
271+
.set('Cookie', `${cookie}`)
272+
.send({
273+
params: {
274+
reason: 'tests did not pass',
275+
},
276+
});
277+
272278
expect(res.status).toBe(200);
273279
});
274280

@@ -281,7 +287,12 @@ describe('Push API', () => {
281287
await loginAsApprover();
282288
const res = await request(app)
283289
.post(`/api/v1/push/${TEST_PUSH.id}/reject`)
284-
.set('Cookie', `${cookie}`);
290+
.set('Cookie', `${cookie}`)
291+
.send({
292+
params: {
293+
reason: 'tests did not pass',
294+
},
295+
});
285296
expect(res.status).toBe(401);
286297
});
287298

@@ -290,7 +301,13 @@ describe('Push API', () => {
290301
await loginAsCommitter();
291302
const res = await request(app)
292303
.post(`/api/v1/push/${TEST_PUSH.id}/reject`)
293-
.set('Cookie', `${cookie}`);
304+
.set('Cookie', `${cookie}`)
305+
.send({
306+
params: {
307+
reason: 'tests did not pass',
308+
},
309+
});
310+
294311
expect(res.status).toBe(401);
295312
});
296313

0 commit comments

Comments
 (0)