From 3ed9c9a4a5f7c698504b7f087b5d34844c2b271f Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 3 Jul 2024 12:15:56 +0200 Subject: [PATCH] Test --- packages/backend-core/src/users/test/db.spec.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/backend-core/src/users/test/db.spec.ts b/packages/backend-core/src/users/test/db.spec.ts index bc72c8d683..736422f653 100644 --- a/packages/backend-core/src/users/test/db.spec.ts +++ b/packages/backend-core/src/users/test/db.spec.ts @@ -123,6 +123,14 @@ describe("UserDB", () => { ) }) }) + + it("email cannot be updated by default", async () => { + await config.doInTenant(async () => { + await expect( + db.save({ ...user, email: generator.email({}) }) + ).rejects.toThrow("Email address cannot be changed") + }) + }) }) }) })