Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. it('Should create new user', (done) => {
  2. const newUserCredentials = {
  3. username: "testowyUzytkownik",
  4. password: "testoweHaslo",
  5. email: "testowy@email.com"
  6. };
  7.  
  8. chai.request('http://localhost:8080/api/v1')
  9. .post('/users')
  10. .send(newUserCredentials)
  11. .then(response => {
  12. expect(response).to.have.status(201);
  13. expect(response.body.success).to.equal(true);
  14. expect(response.body.message).to.equal('Pomyślnie założono konto.');
  15. done();
  16. })
  17. .catch(done);
  18. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement