Skip to content

Instantly share code, notes, and snippets.

@gbols
Created November 22, 2018 13:33
Show Gist options
  • Save gbols/c08c98574199b4a14de84787ce8ad63b to your computer and use it in GitHub Desktop.
Save gbols/c08c98574199b4a14de84787ce8ad63b to your computer and use it in GitHub Desktop.
import chai from 'chai';
import chaiHttp from 'chai-http';
import app from '../src/app';
describe('APP', () => {
it("it should'nt allow improper input fileds", (done) => {
const signup = {
username: 'tunde',
password: '',
email: 'tunde@tunde.com',
address: '4 Napier Garden Lekki Lagos',
phone: '0810 954 8778',
};
chai
.request(app)
.post('/api/v1/auth/signup')
.send(signup)
.end((err, res) => {
res.should.have.status(400);
res.body.should.have
.property('message');
res.body.should.have
.property('success')
.eql(false);
done();
});
});
});
});
@theghostyced
Copy link

theghostyced commented Nov 22, 2018

Amazing one Gbols :)
Nice work though.

@Danielshow
Copy link

All well said, Nice work Gbols.

@idmega2000
Copy link

Nice work Gbols

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment