0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00
verdaccio/test/functional/adduser/adduser.js
Juan Picado @jotadeveloper 2c8c8f0295
refactor: update jetst match
using more consntants
2018-06-23 20:59:18 +02:00

28 lines
837 B
JavaScript

import {HTTP_STATUS} from "../../../src/lib/constants";
export default function(server) {
describe('npm adduser', () => {
const user = String(Math.random());
const pass = String(Math.random());
beforeAll(function() {
return server.auth(user, pass)
.status(HTTP_STATUS.CREATED)
.body_ok(/user .* created/);
});
test('should create new user', () => {});
test('should log in', () => {
return server.auth(user, pass)
.status(HTTP_STATUS.CREATED)
.body_ok(/you are authenticated as/);
});
test('should not register more users', () => {
return server.auth(String(Math.random()), String(Math.random()))
.status(HTTP_STATUS.CONFLICT)
.body_error(/maximum amount of users reached/);
});
});
}