Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe('Get customer info', () => {
- it('should return a valid response', () => {
- response.should.have.status(200);
- response.should.be.json;
- response.body.should.not.be.empty;
- });
- it('should set the Location header', () => {
- response.should.have.header('Location');
- });
- it('should match the customer schema', () => {
- var customerSchema = JSON.parse(environment.customerSchema));
- response.body.should.have.schema(customerSchema);
- });
- it('should return the correct customer', () => {
- response.body.id.should.equal(12345);
- response.body.age.should.be.above(18).and.below(99);
- response.body.firstName.should.be.a('string').and.not.empty;
- response.body.lastName.should.be.oneOf(['Smith', 'Jones', 'Robinson']);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement