1
0
Fork 0
mirror of synced 2024-07-13 02:05:54 +12:00

test case is only for internal.

This commit is contained in:
mike12345567 2024-06-20 18:53:01 +01:00
parent ae68c561f4
commit fead1f436a

View file

@ -276,30 +276,34 @@ describe.each([
}) })
}) })
it("shouldn't allow duplicate column names", async () => { isInternal &&
const saveTableRequest: SaveTableRequest = { it("shouldn't allow duplicate column names", async () => {
...basicTable(), const saveTableRequest: SaveTableRequest = {
} ...basicTable(),
saveTableRequest.schema["Type"] = { type: FieldType.STRING, name: "Type" } }
await config.api.table.save(saveTableRequest, { saveTableRequest.schema["Type"] = {
status: 400, type: FieldType.STRING,
body: { name: "Type",
message: }
'Column "type" is duplicated - make sure there are no duplicate columns names, this is case insensitive.', await config.api.table.save(saveTableRequest, {
}, status: 400,
body: {
message:
'Column "type" is duplicated - make sure there are no duplicate columns names, this is case insensitive.',
},
})
saveTableRequest.schema = {
foo: { type: FieldType.STRING, name: "foo" },
FOO: { type: FieldType.STRING, name: "FOO" },
}
await config.api.table.save(saveTableRequest, {
status: 400,
body: {
message:
'Column "foo" is duplicated - make sure there are no duplicate columns names, this is case insensitive.',
},
})
}) })
saveTableRequest.schema = {
foo: { type: FieldType.STRING, name: "foo" },
FOO: { type: FieldType.STRING, name: "FOO" },
}
await config.api.table.save(saveTableRequest, {
status: 400,
body: {
message:
'Column "foo" is duplicated - make sure there are no duplicate columns names, this is case insensitive.',
},
})
})
it("should add a new column for an internal DB table", async () => { it("should add a new column for an internal DB table", async () => {
const saveTableRequest: SaveTableRequest = { const saveTableRequest: SaveTableRequest = {