chore: shortens collection names in relationship test suite

This commit is contained in:
James
2023-10-09 00:22:59 -04:00
parent 7df1256bf6
commit 7b94fb75bb
2 changed files with 9 additions and 9 deletions

View File

@@ -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: [
{

View File

@@ -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',