From e838a90d3e22914be68be43ace9e28a75fe56905 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 23 May 2023 10:22:26 +0200 Subject: [PATCH] Add small unit test --- .../src/integrations/tests/googlesheets.spec.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/server/src/integrations/tests/googlesheets.spec.ts b/packages/server/src/integrations/tests/googlesheets.spec.ts index 5aabb13afc..fcb24c152a 100644 --- a/packages/server/src/integrations/tests/googlesheets.spec.ts +++ b/packages/server/src/integrations/tests/googlesheets.spec.ts @@ -144,4 +144,15 @@ describe("Google Sheets Integration", () => { }) }) }) + + describe("testConnection", () => { + it("can test successful connections", async () => { + await config.doInContext(structures.uuid(), async () => { + const res = await integration.testConnection() + + expect(mockGoogleIntegration.loadInfo).toBeCalledTimes(1) + expect(res).toEqual({ connected: true }) + }) + }) + }) })