Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Joi from 'joi'

const MAX_FIELDS = 50
const MAX_FIELDS = 100
const contentTypeSchema = Joi.object().keys({
name: Joi.string().required(),
description: Joi.string().allow(''),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ describe('payload validation', function () {
const lunch = migration.createContentType('lunch')
lunch.name('A lunch')

for (let i = 0; i < 51; i++) {
for (let i = 0; i < 101; i++) {
lunch.createField(`menu${i}`).type('Symbol').name(`menu${i}`)
}
}, [])
expect(errors).to.eql([
[
{
type: 'InvalidPayload',
message: 'Content type "lunch" cannot have more than 50 fields.'
message: 'Content type "lunch" cannot have more than 100 fields.'
}
]
])
Expand Down