From 7b94fb75bbdcf686cd5bc52dfe4d54b53a03beb6 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 9 Oct 2023 00:22:59 -0400 Subject: [PATCH] chore: shortens collection names in relationship test suite --- test/relationships/config.ts | 6 +++--- test/relationships/int.spec.ts | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/relationships/config.ts b/test/relationships/config.ts index bcc7e43191..54c4d15f0e 100644 --- a/test/relationships/config.ts +++ b/test/relationships/config.ts @@ -39,9 +39,9 @@ const collectionWithName = (collectionSlug: string): CollectionConfig => { export const slug = 'posts' export const relationSlug = 'relation' export const defaultAccessRelSlug = 'strict-access' -export const chainedRelSlug = 'chained-relation' -export const customIdSlug = 'custom-id-relation' -export const customIdNumberSlug = 'custom-id-number-relation' +export const chainedRelSlug = 'chained' +export const customIdSlug = 'custom-id' +export const customIdNumberSlug = 'custom-id-number' export default buildConfigWithDefaults({ collections: [ { diff --git a/test/relationships/int.spec.ts b/test/relationships/int.spec.ts index 6329a4ce1c..c47bf3e2b1 100644 --- a/test/relationships/int.spec.ts +++ b/test/relationships/int.spec.ts @@ -261,7 +261,7 @@ describe('Relationships', () => { beforeAll(async () => { const thirdLevelDoc = await payload.create({ - collection: 'chained-relation', + collection: 'chained', data: { name: 'third', }, @@ -270,7 +270,7 @@ describe('Relationships', () => { thirdLevelID = thirdLevelDoc.id const secondLevelDoc = await payload.create({ - collection: 'chained-relation', + collection: 'chained', data: { name: 'second', relation: thirdLevelID, @@ -280,7 +280,7 @@ describe('Relationships', () => { secondLevelID = secondLevelDoc.id const firstLevelDoc = await payload.create({ - collection: 'chained-relation', + collection: 'chained', data: { name: 'first', relation: secondLevelID, @@ -292,7 +292,7 @@ describe('Relationships', () => { it('should allow querying one level deep', async () => { const query1 = await payload.find({ - collection: 'chained-relation', + collection: 'chained', where: { 'relation.name': { equals: 'second', @@ -304,7 +304,7 @@ describe('Relationships', () => { expect(query1.docs[0].id).toStrictEqual(firstLevelID) const query2 = await payload.find({ - collection: 'chained-relation', + collection: 'chained', where: { 'relation.name': { equals: 'third', @@ -318,7 +318,7 @@ describe('Relationships', () => { it('should allow querying two levels deep', async () => { const query = await payload.find({ - collection: 'chained-relation', + collection: 'chained', where: { 'relation.relation.name': { equals: 'third',