Skip to content

Commit 2e267f9

Browse files
fix(security): replace hardcoded password in test to satisfy GitGuardian
1 parent ecc5e5e commit 2e267f9

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/app/actions/auth.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe('auth server actions', () => {
7575
const { login } = await import('./auth');
7676
const formData = new FormData();
7777
formData.set('email', 'invalid-email');
78-
formData.set('password', 'password123');
78+
formData.set('password', '__TEST_PASSWORD__');
7979

8080
const result = await login(undefined, formData);
8181
expect(result).toEqual({
@@ -101,7 +101,7 @@ describe('auth server actions', () => {
101101
const { login } = await import('./auth');
102102
const formData = new FormData();
103103
formData.set('email', 'test@test.com');
104-
formData.set('password', 'password123');
104+
formData.set('password', '__TEST_PASSWORD__');
105105

106106
const result = await login(undefined, formData);
107107
expect(result).toEqual({
@@ -114,7 +114,7 @@ describe('auth server actions', () => {
114114
const { login } = await import('./auth');
115115
const formData = new FormData();
116116
formData.set('email', 'test@test.com');
117-
formData.set('password', 'password123');
117+
formData.set('password', '__TEST_PASSWORD__');
118118

119119
await expect(login(undefined, formData)).rejects.toThrow('Redirect to /dashboard');
120120
expect(redirect).toHaveBeenCalledWith('/dashboard');
@@ -125,7 +125,7 @@ describe('auth server actions', () => {
125125
const { login } = await import('./auth');
126126
const formData = new FormData();
127127
formData.set('email', 'aluno@test.com');
128-
formData.set('password', 'password123');
128+
formData.set('password', '__TEST_PASSWORD__');
129129

130130
await expect(login(undefined, formData)).rejects.toThrow('Redirect to /aluno/dashboard');
131131
expect(redirect).toHaveBeenCalledWith('/aluno/dashboard');
@@ -136,7 +136,7 @@ describe('auth server actions', () => {
136136
const { login } = await import('./auth');
137137
const formData = new FormData();
138138
formData.set('email', 'test@test.com');
139-
formData.set('password', 'password123');
139+
formData.set('password', '__TEST_PASSWORD__');
140140

141141
const result = await login(undefined, formData);
142142
expect(result).toEqual({
@@ -149,7 +149,7 @@ describe('auth server actions', () => {
149149
const { login } = await import('./auth');
150150
const formData = new FormData();
151151
formData.set('email', 'aluno@test.com');
152-
formData.set('password', 'password123');
152+
formData.set('password', '__TEST_PASSWORD__');
153153

154154
await expect(login(undefined, formData)).rejects.toThrow('Redirect to /aluno/dashboard');
155155
});
@@ -159,7 +159,7 @@ describe('auth server actions', () => {
159159
const { login } = await import('./auth');
160160
const formData = new FormData();
161161
formData.set('email', 'gerente@test.com');
162-
formData.set('password', 'password123');
162+
formData.set('password', '__TEST_PASSWORD__');
163163

164164
await expect(login(undefined, formData)).rejects.toThrow('Redirect to /dashboard');
165165
});
@@ -187,7 +187,7 @@ describe('auth server actions', () => {
187187
const { login } = await import('./auth');
188188
const formData = new FormData();
189189
formData.set('email', 'test@test.com');
190-
formData.set('password', 'password123');
190+
formData.set('password', '__TEST_PASSWORD__');
191191

192192
const result = await login(undefined, formData);
193193
expect(result).toEqual({

0 commit comments

Comments
 (0)