Fix/postgres relation names (#5976)
This commit is contained in:
@@ -3,6 +3,8 @@ import type { IndexDirection, IndexOptions } from 'mongoose'
|
||||
import type { Payload } from 'payload'
|
||||
import type { PaginatedDocs } from 'payload/database'
|
||||
|
||||
import { reload } from '@payloadcms/next/utilities'
|
||||
|
||||
import type { NextRESTClient } from '../helpers/NextRESTClient.js'
|
||||
import type { GroupField, RichTextField } from './payload-types.js'
|
||||
|
||||
@@ -916,6 +918,22 @@ describe('Fields', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('should hot module reload and still be able to create', async () => {
|
||||
const testDoc1 = await payload.findByID({
|
||||
collection: tabsFieldsSlug,
|
||||
id: document.id,
|
||||
})
|
||||
|
||||
await reload(payload.config, payload)
|
||||
|
||||
const testDoc2 = await payload.findByID({
|
||||
collection: tabsFieldsSlug,
|
||||
id: document.id,
|
||||
})
|
||||
|
||||
expect(testDoc1.id).toStrictEqual(testDoc2.id)
|
||||
})
|
||||
|
||||
it('should create with fields inside a named tab', () => {
|
||||
expect(document.tab.text).toStrictEqual(namedTabText)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user