From c0581e41d31eca08efa07556e5cfa9129c29289c Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Fri, 26 Jan 2024 10:57:35 +0100 Subject: [PATCH] Renames --- packages/server/src/api/routes/public/tests/compare.spec.ts | 6 +++--- packages/server/src/tests/utilities/TestConfiguration.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/server/src/api/routes/public/tests/compare.spec.ts b/packages/server/src/api/routes/public/tests/compare.spec.ts index f9616b06e1..ccf248f360 100644 --- a/packages/server/src/api/routes/public/tests/compare.spec.ts +++ b/packages/server/src/api/routes/public/tests/compare.spec.ts @@ -12,7 +12,7 @@ let apiKey: string, table: Table, app: App, makeRequest: any beforeAll(async () => { app = await config.init() - table = await config.updateTable() + table = await config.upsertTable() apiKey = await config.generateApiKey() makeRequest = generateMakeRequest(apiKey) }) @@ -69,7 +69,7 @@ describe("check the applications endpoints", () => { describe("check the tables endpoints", () => { it("should allow retrieving tables through search", async () => { await config.createApp("new app 1") - table = await config.updateTable() + table = await config.upsertTable() const res = await makeRequest("post", "/tables/search") expect(res).toSatisfyApiSpec() }) @@ -108,7 +108,7 @@ describe("check the tables endpoints", () => { describe("check the rows endpoints", () => { let row: Row it("should allow retrieving rows through search", async () => { - table = await config.updateTable() + table = await config.upsertTable() const res = await makeRequest("post", `/tables/${table._id}/rows/search`, { query: {}, }) diff --git a/packages/server/src/tests/utilities/TestConfiguration.ts b/packages/server/src/tests/utilities/TestConfiguration.ts index 90fa535ac8..2db5a81674 100644 --- a/packages/server/src/tests/utilities/TestConfiguration.ts +++ b/packages/server/src/tests/utilities/TestConfiguration.ts @@ -587,7 +587,7 @@ class TestConfiguration { // TABLE - async updateTable( + async upsertTable( config?: TableToBuild, { skipReassigning } = { skipReassigning: false } ): Promise { @@ -614,7 +614,7 @@ class TestConfiguration { if (!config.sourceId) { config.sourceId = INTERNAL_TABLE_SOURCE_ID } - return this.updateTable(config, options) + return this.upsertTable(config, options) } async createExternalTable( @@ -629,7 +629,7 @@ class TestConfiguration { config.sourceId = this.datasource._id config.sourceType = TableSourceType.EXTERNAL } - return this.updateTable(config, options) + return this.upsertTable(config, options) } async getTable(tableId?: string) {