management.endpoint.Test.js 840 B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. var testConfig = require('../config');
  3. var APIv1 = require('../../../src/server/include/endpoints').APIv1;
  4. var should = require("should");
  5. var server = require('supertest').agent(testConfig.host);
  6. describe('API: Management', function () {
  7. describe('when require /db', function(){
  8. it('should return 200', function (done) {
  9. var path = APIv1.Management.Base + APIv1.Management.DbStatus;
  10. server.get(path)
  11. .expect(200, function (err, response) {
  12. //console.log(response.body);
  13. response.body.length.should.equal(2);
  14. response.body[0].tables.length.should.greaterThan(5);
  15. response.body[1].tables.length.should.greaterThan(5);
  16. done();
  17. });
  18. });
  19. });
  20. });