mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Port 3 more controllers to use DTOs (no-changelog) (#12375)
This commit is contained in:
committed by
GitHub
parent
1d5e891a0d
commit
371a09de96
@@ -147,6 +147,21 @@ describe('POST /login', () => {
|
||||
const response = await testServer.authAgentFor(ownerUser).get('/login');
|
||||
expect(response.statusCode).toBe(200);
|
||||
});
|
||||
|
||||
test('should fail on invalid email in the payload', async () => {
|
||||
const response = await testServer.authlessAgent.post('/login').send({
|
||||
email: 'invalid-email',
|
||||
password: ownerPassword,
|
||||
});
|
||||
|
||||
expect(response.statusCode).toBe(400);
|
||||
expect(response.body).toEqual({
|
||||
validation: 'email',
|
||||
code: 'invalid_string',
|
||||
message: 'Invalid email',
|
||||
path: ['email'],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('GET /login', () => {
|
||||
|
||||
Reference in New Issue
Block a user