From 98b4281e672ecc76d782a9d40d2d56a0f67a106a Mon Sep 17 00:00:00 2001 From: Matheus Sanchez Date: Sun, 4 Feb 2024 16:53:57 -0300 Subject: [PATCH] Brazil as default country --- .../20240204194612_brazil_as_default_country/migration.sql | 2 ++ prisma/schema.prisma | 2 +- src/controller/user/getUserByEmail.spec.ts | 2 +- src/controller/user/getUserById.spec.ts | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 prisma/migrations/20240204194612_brazil_as_default_country/migration.sql diff --git a/prisma/migrations/20240204194612_brazil_as_default_country/migration.sql b/prisma/migrations/20240204194612_brazil_as_default_country/migration.sql new file mode 100644 index 0000000..e476baa --- /dev/null +++ b/prisma/migrations/20240204194612_brazil_as_default_country/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "User" ALTER COLUMN "country" SET DEFAULT 'Brazil'; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 42fd83d..bad8907 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -17,7 +17,7 @@ model User { is_google Boolean @default(false) created_at DateTime @default(now()) updated_at DateTime @updatedAt - country String @default("brasil") + country String @default("Brazil") projects Project[] } diff --git a/src/controller/user/getUserByEmail.spec.ts b/src/controller/user/getUserByEmail.spec.ts index 956627c..b57276c 100644 --- a/src/controller/user/getUserByEmail.spec.ts +++ b/src/controller/user/getUserByEmail.spec.ts @@ -29,7 +29,7 @@ describe('Get User By email E2E', () => { expect.objectContaining({ email: 'johndoe@example.com', id: userAuth.userId, - country: 'brasil', + country: 'Brazil', }), ) }) diff --git a/src/controller/user/getUserById.spec.ts b/src/controller/user/getUserById.spec.ts index f552486..5361848 100644 --- a/src/controller/user/getUserById.spec.ts +++ b/src/controller/user/getUserById.spec.ts @@ -28,7 +28,7 @@ describe('Get User By Id E2E', () => { expect(getUserByIdResponse.body.user).toEqual( expect.objectContaining({ id: userAuth.userId, - country: 'brasil', + country: 'Brazil', }), ) })