chore: prefer config.collections over payload.collections for validations

This commit is contained in:
Alessio Gravili
2023-10-10 16:20:11 +02:00
parent e41899cd27
commit 46430f5598
2 changed files with 33 additions and 30 deletions

View File

@@ -193,20 +193,25 @@ describe('Field Validations', () => {
})
describe('relationship', () => {
const relationCollection = {
fields: [
{
name: 'id',
type: 'text',
},
],
slug: 'relation',
}
const relationshipOptions = {
...options,
config: {
collections: [relationCollection],
},
payload: {
collections: {
relation: {
config: {
fields: [
{
name: 'id',
type: 'text',
},
],
slug: 'relation',
},
config: relationCollection,
},
},
},