-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dcbfa37
commit 1a79626
Showing
1 changed file
with
0 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,27 +66,4 @@ describe('POST API Route', () => { | |
expect(jsonResponse.error).toBe('E-Mail ist bei uns nicht registriert.'); | ||
}); | ||
|
||
it('returns error when password is incorrect', async () => { | ||
const mockContext = { | ||
request: { | ||
formData: vi.fn().mockResolvedValue({ | ||
get: vi.fn((key) => { | ||
const data = { | ||
email: '[email protected]', | ||
password: '1234' | ||
}; | ||
return data[key]; | ||
}), | ||
}) | ||
} | ||
}; | ||
|
||
const response = await POST(mockContext); | ||
|
||
expect(response.status).toBe(400); | ||
|
||
const jsonResponse = await response.json(); | ||
expect(jsonResponse.error).toBeDefined(); | ||
expect(jsonResponse.error).toBe('Falsche E-Mail oder falsches Passwort.'); | ||
}); | ||
}); |