application.endpoint.Test.js 851 B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. var testConfig = require('../config');
  3. var APIv1 = require('../../../src/doctor/include/endpoints').APIv1;
  4. var should = require("should");
  5. var restTemplate = require('supertest').agent(testConfig.host);
  6. var userId = '48832ecc339111e6badcfa163e789456';
  7. describe('API: App info', function () {
  8. // 获取角标数
  9. describe('when get badge number', function () {
  10. it('shout return 200 and badge number', function (done) {
  11. var path = APIv1.Application.Base + APIv1.Application.BadgeNo + "?user_id=" + userId;
  12. restTemplate.get(path)
  13. .end(function (err, response) {
  14. console.log("User " + userId + "'s badge number: \n", response.body);
  15. response.status.should.equal(200);
  16. done();
  17. });
  18. });
  19. });
  20. });