Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- it('Should create new user', (done) => {
- const newUserCredentials = {
- username: "testowyUzytkownik",
- password: "testoweHaslo",
- email: "testowy@email.com"
- };
- chai.request('http://localhost:8080/api/v1')
- .post('/users')
- .send(newUserCredentials)
- .then(response => {
- expect(response).to.have.status(201);
- expect(response.body.success).to.equal(true);
- expect(response.body.message).to.equal('Pomyślnie założono konto.');
- done();
- })
- .catch(done);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement