Skip to content

Commit ef77b9f

Browse files
committed
Switch fake IDs in tests to UUID format
1 parent 6748714 commit ef77b9f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

test/partnership.e2e-spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { sample, times } from 'lodash';
2+
import { v1 as uuid } from 'uuid';
23
import { CalendarDate, ID } from '../src/common';
34
import { Role } from '../src/components/authorization';
45
import { PartnerType } from '../src/components/partner';
@@ -275,7 +276,7 @@ describe('Partnership e2e', () => {
275276
await expect(
276277
createPartnership(app, {
277278
projectId: project.id,
278-
partnerId: 'fakePartner' as ID,
279+
partnerId: uuid() as ID,
279280
}),
280281
).rejects.toThrowGqlError(
281282
errors.notFound({
@@ -288,7 +289,7 @@ describe('Partnership e2e', () => {
288289
it('create partnership does not create if projectId is invalid', async () => {
289290
await expect(
290291
createPartnership(app, {
291-
projectId: 'fakeProject' as ID,
292+
projectId: uuid() as ID,
292293
}),
293294
).rejects.toThrowGqlError(
294295
errors.notFound({

test/project.e2e-spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { faker } from '@faker-js/faker';
22
import { intersection, times } from 'lodash';
33
import { DateTime } from 'luxon';
4+
import { v1 as uuid } from 'uuid';
45
import {
56
CalendarDate,
67
generateId,
@@ -201,7 +202,7 @@ describe('Project e2e', () => {
201202
createProject(app, {
202203
name: faker.string.uuid(),
203204
type: ProjectType.MomentumTranslation,
204-
fieldRegionId: 'invalid-location-id' as ID,
205+
fieldRegionId: uuid() as ID,
205206
}),
206207
).rejects.toThrowGqlError(
207208
errors.notFound({

0 commit comments

Comments
 (0)