From ae0e3cdb5950025b5ef28b433a10b622bb0fbffc Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 2 Sep 2024 18:36:44 +0200 Subject: [PATCH] Fix test for external --- packages/server/src/api/routes/tests/viewV2.spec.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/server/src/api/routes/tests/viewV2.spec.ts b/packages/server/src/api/routes/tests/viewV2.spec.ts index 5ff8fed0bdc..699d388a6d7 100644 --- a/packages/server/src/api/routes/tests/viewV2.spec.ts +++ b/packages/server/src/api/routes/tests/viewV2.spec.ts @@ -1199,18 +1199,25 @@ describe.each([ const table = await config.api.table.save( saveTableRequest({ + schema: {}, + }) + ) + await config.api.table.save({ + ...table, schema: { + ...table.schema, aux: { name: "aux", relationshipType: RelationshipType.ONE_TO_MANY, type: FieldType.LINK, tableId: auxTable._id!, fieldName: "fk_aux", - constraints: { presence: true }, + constraints: { type: "array" }, }, }, }) - ) + // Refetch auxTable + auxTable = await config.api.table.get(auxTable._id!) const view = await config.api.viewV2.create({ name: "view a", @@ -1226,8 +1233,6 @@ describe.each([ }, }) - // Refetch autTable - auxTable = await config.api.table.get(auxTable._id!) await config.api.table.save({ ...auxTable, schema: {