From 2876085b61c3bcc1c34fcff9d7931fc10704f3bc Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 5 Apr 2024 18:35:56 +0100 Subject: [PATCH] Fixing test case to update schema when updating column name. --- packages/server/src/api/routes/tests/table.spec.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/server/src/api/routes/tests/table.spec.ts b/packages/server/src/api/routes/tests/table.spec.ts index 8162e08eb6..2f8f83896b 100644 --- a/packages/server/src/api/routes/tests/table.spec.ts +++ b/packages/server/src/api/routes/tests/table.spec.ts @@ -129,12 +129,20 @@ describe.each([ name: "test", }) + const { name, ...otherColumns } = testTable.schema const updatedTable = await config.api.table.save({ ...testTable, _rename: { old: "name", updated: "updatedName", }, + schema: { + ...otherColumns, + updatedName: { + ...name, + name: "updatedName", + }, + }, }) expect(updatedTable.name).toEqual(testTable.name)