Skip to content

Commit 7ca3bb7

Browse files
committed
test(backend): update tests for lowercase email normalization (SCRUM-307)
1 parent c94199e commit 7ca3bb7

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

backend/src/modules/users/users.repository.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe('UsersRepository', () => {
4040

4141
const mockUser = {
4242
id: USER_UUID,
43-
email: 'exampleStudent1@fhstp.ac.at',
43+
email: 'examplestudent1@fhstp.ac.at',
4444
first_name: 'Max',
4545
last_name: 'Mustermann',
4646
role: Role.STUDENT,
@@ -89,7 +89,7 @@ describe('UsersRepository', () => {
8989
describe('findUsers', () => {
9090
it('should return users matching email query', async () => {
9191
// Arrange
92-
const searchQuery = 'exampleStudent1@fhstp.ac.at';
92+
const searchQuery = 'examplestudent1@fhstp.ac.at';
9393
mockPrismaService.user.findMany.mockResolvedValue([mockUser]);
9494

9595
// Act
@@ -297,7 +297,7 @@ describe('UsersRepository', () => {
297297
it('should create a new user', async () => {
298298
// Arrange
299299
const userData = {
300-
email: 'exampleStudent1@fhstp.ac.at',
300+
email: 'examplestudent1@fhstp.ac.at',
301301
first_name: 'Max',
302302
last_name: 'Mustermann',
303303
role: Role.STUDENT,
@@ -323,7 +323,7 @@ describe('UsersRepository', () => {
323323
{
324324
...mockUser,
325325
id: USER_UUID_2,
326-
email: 'exampleStudent2@fhstp.ac.at',
326+
email: 'examplestudent2@fhstp.ac.at',
327327
first_name: 'Maria',
328328
last_name: 'Mustermann',
329329
profile_image: 'https://superwise.at/images/a7f32c8b-d09e-47a1-83c1-5fe198b67890.jpg',
@@ -421,7 +421,7 @@ describe('UsersRepository', () => {
421421
describe('findUserByEmail', () => {
422422
it('should find a user by email', async () => {
423423
// Arrange
424-
const email = 'exampleStudent1@fhstp.ac.at';
424+
const email = 'examplestudent1@fhstp.ac.at';
425425
mockPrismaService.user.findUnique.mockResolvedValue(mockUser);
426426

427427
// Act

backend/src/modules/users/users.service.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('UsersService', () => {
5151

5252
const mockStudent = {
5353
id: USER_UUID,
54-
email: 'exampleStudent1@fhstp.ac.at',
54+
email: 'examplestudent1@fhstp.ac.at',
5555
first_name: 'Max',
5656
last_name: 'Mustermann',
5757
role: Role.STUDENT,
@@ -65,7 +65,7 @@ describe('UsersService', () => {
6565

6666
const mockSupervisor = {
6767
id: USER_UUID_2,
68-
email: 'exampleSupervisor@fhstp.ac.at',
68+
email: 'examplesupervisor@fhstp.ac.at',
6969
first_name: 'Supervisor',
7070
last_name: 'Example',
7171
role: Role.SUPERVISOR,
@@ -83,7 +83,7 @@ describe('UsersService', () => {
8383
mockUser,
8484
{
8585
id: USER_UUID_2,
86-
email: 'exampleStudent2@fhstp.ac.at',
86+
email: 'examplestudent2@fhstp.ac.at',
8787
first_name: 'Maria',
8888
last_name: 'Mustermann',
8989
role: Role.STUDENT,

0 commit comments

Comments
 (0)