-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
34 lines (30 loc) · 738 Bytes
/
test.js
File metadata and controls
34 lines (30 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
* Created by steven on 17/5/8.
*/
const should = require('should');
const assert = require('assert');
const request = require('supertest');
const config = require("../../config");
describe('log', function() {
var url = config.domain;
var userCookie = '';
before(function (done) {
done();
});
describe('#test', function () {
it('/log/test', function (done) {
request(url)
.post('/api/log/test')
.expect('Content-Type', /json/)
.expect(200) //Status code
.end(function (err, res) {
if (err) {
throw err;
}
// Should.js fluent syntax applied
res.body.status.should.equal('0');
done();
});
});
});
})