var APIeasy = require('api-easy'); var assert = require('chai').assert; var suite = APIeasy.describe('packages'); suite.discuss('packages version 1.0') .use('212.100.229.176', 9000) .get('/1.0/packages', 'context=nl&connectorCode=3&start=1&end=1') .expect(200) .expect('expect _version on the first level', function (err, res, body) { var json = JSON.parse(body); assert.property(JSON.parse(body), '_version', 'falta _version'); }) .expect('expect _links on the first level', function (err, res, body) { assert.property(JSON.parse(body), '_links', 'falta _links'); }) .expect('expect stats on the first level', function (err, ress, body) { assert.property(JSON.parse(body), 'stats', ''); }) .expect('expect _embedded on the first level', function (err, ress, body) { assert.property(JSON.parse(body), '_embedded', ''); }) .expect('expect _connectorCode on the first level', function (err, ress, body) { assert.property(JSON.parse(body), '_conectorCode', ''); }) .export(module);