From 56a8ff12fd1858c5922e81c8fef1a83e5468ed9b Mon Sep 17 00:00:00 2001 From: Jamie Klassen Date: Thu, 21 Jul 2022 10:53:32 -0400 Subject: [PATCH] fake gitlab API more precisely This allows this suite to detect when an unexpected path is passed to the projects API. Signed-off-by: Jamie Klassen --- packages/integration/src/gitlab/core.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/integration/src/gitlab/core.test.ts b/packages/integration/src/gitlab/core.test.ts index b87c5c3af8..de785fb41d 100644 --- a/packages/integration/src/gitlab/core.test.ts +++ b/packages/integration/src/gitlab/core.test.ts @@ -28,7 +28,10 @@ describe('gitlab core', () => { beforeEach(() => { worker.use( - rest.get('*/api/v4/projects/:name', (_, res, ctx) => + rest.get('*/api/v4/projects/group%2Fproject', (_, res, ctx) => + res(ctx.status(200), ctx.json({ id: 12345 })), + ), + rest.get('*/api/v4/projects/group%2Fsubgroup%2Fproject', (_, res, ctx) => res(ctx.status(200), ctx.json({ id: 12345 })), ), );