From 3633da9b8ecbbc5fddda8676f9797086a39ffac7 Mon Sep 17 00:00:00 2001 From: Gabriel Ruschel <grc15@inf.ufpr.br> Date: Wed, 31 May 2017 11:01:47 -0300 Subject: [PATCH] Fix test --- src/test/user.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/test/user.js b/src/test/user.js index eb266304..e6f55dc6 100644 --- a/src/test/user.js +++ b/src/test/user.js @@ -55,7 +55,7 @@ describe('Saves a user', () => { .set('x-apicache-bypass', 'true') .send(newUser) .end((err, res) => { - res.should.have.status(200); + res.should.have.status(201); res.should.be.json; res.body.should.have.property('success'); res.body.success.should.equal(true); @@ -464,7 +464,7 @@ describe('Authenticates a user', () => { .send({email: 'lorem@ipsum.com', password: 'umasenhaerrada'}) .end((err, res) => { - res.should.have.status(200); + res.should.have.status(400); res.should.be.json; res.body.should.have.property('success'); res.body.success.should.equal(false); @@ -502,7 +502,7 @@ describe('Authenticates a user', () => { .send({email: 'dolor@ipsum.com', password: '123mudar'}) .end((err, res) => { - res.should.have.status(200); + res.should.have.status(400); res.should.be.json; res.body.should.have.property('success'); res.body.success.should.equal(false); @@ -539,7 +539,7 @@ describe('Authenticates a user', () => { .set('x-apicache-bypass', 'true') .send({password: '123mudar'}) .end((err, res) => { - res.should.have.status(200); + res.should.have.status(400); res.should.be.json; res.body.should.have.property('success'); res.body.success.should.equal(false); @@ -576,7 +576,7 @@ describe('Authenticates a user', () => { .set('x-apicache-bypass', 'true') .send({email:'lorem@ipsum.com'}) .end((err, res) => { - res.should.have.status(200); + res.should.have.status(400); res.should.be.json; res.body.should.have.property('success'); res.body.success.should.equal(false); @@ -613,7 +613,7 @@ describe('Authenticates a user', () => { .set('x-apicache-bypass', 'true') .send({email:'lorem@ipsum.com', password: '123'}) .end((err, res) => { - res.should.have.status(200); + res.should.have.status(400); res.should.be.json; res.body.should.have.property('success'); res.body.success.should.equal(false); -- GitLab