mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-06 22:40:26 -05:00
test(unit): fix test for disabling web login (#3848)
This commit is contained in:
parent
59a6c01124
commit
c3b0247019
2 changed files with 4 additions and 2 deletions
|
@ -70,6 +70,7 @@ export const HTTP_STATUS = {
|
|||
INTERNAL_ERROR: httpCodes.INTERNAL_SERVER_ERROR,
|
||||
SERVICE_UNAVAILABLE: httpCodes.SERVICE_UNAVAILABLE,
|
||||
LOOP_DETECTED: 508,
|
||||
CANNOT_HANDLE: 590,
|
||||
};
|
||||
|
||||
export const ERROR_CODE = {
|
||||
|
|
|
@ -65,7 +65,7 @@ describe('test web server', () => {
|
|||
});
|
||||
});
|
||||
|
||||
test.skip('log in should be disabled', async () => {
|
||||
test('log in should be disabled', async () => {
|
||||
return supertest(await initializeServer('login-disabled.yaml'))
|
||||
.post('/-/verdaccio/sec/login')
|
||||
.send(
|
||||
|
@ -75,7 +75,8 @@ describe('test web server', () => {
|
|||
})
|
||||
)
|
||||
.set(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON)
|
||||
.expect(HTTP_STATUS.NOT_FOUND);
|
||||
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
||||
.expect(HTTP_STATUS.CANNOT_HANDLE, JSON.stringify({ error: 'cannot handle this' }));
|
||||
});
|
||||
|
||||
test.todo('should change password');
|
||||
|
|
Loading…
Reference in a new issue