diff --git a/test/fields/int.spec.ts b/test/fields/int.spec.ts index 64d0b00c3..7e5ddf6fa 100644 --- a/test/fields/int.spec.ts +++ b/test/fields/int.spec.ts @@ -7,6 +7,7 @@ import type { NextRESTClient } from '../helpers/NextRESTClient.js' import type { GroupField, RichTextField } from './payload-types.js' import { devUser } from '../credentials.js' +import { initPayloadInt } from '../helpers/initPayloadInt.js' import { isMongoose } from '../helpers/isMongoose.js' import { arrayDefaultValue } from './collections/Array/index.js' import { blocksDoc } from './collections/Blocks/shared.js' @@ -37,7 +38,6 @@ import { let restClient: NextRESTClient let user: any let payload: Payload -import { initPayloadInt } from '../helpers/initPayloadInt.js' describe('Fields', () => { beforeAll(async () => { @@ -599,6 +599,7 @@ describe('Fields', () => { it('should not throw validation error saving multiple null values for unique fields', async () => { const data = { + localizedUniqueRequiredText: 'en1', text: 'a', uniqueRequiredText: 'a', // uniqueText omitted on purpose @@ -610,7 +611,7 @@ describe('Fields', () => { data.uniqueRequiredText = 'b' const result = await payload.create({ collection: 'indexed-fields', - data, + data: { ...data, localizedUniqueRequiredText: 'en2' }, }) expect(result.id).toBeDefined() @@ -625,8 +626,8 @@ describe('Fields', () => { data, }) const result = await payload.duplicate({ - collection: 'indexed-fields', id: doc.id, + collection: 'indexed-fields', }) expect(result.id).not.toEqual(doc.id)