mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 16:30:34 +01:00
should error with no content
This commit is contained in:
@@ -1968,12 +1968,24 @@ describe('Controllers', function () {
|
|||||||
headers: {
|
headers: {
|
||||||
'x-csrf-token': csrf_token,
|
'x-csrf-token': csrf_token,
|
||||||
},
|
},
|
||||||
|
}, function (err, res, body) {
|
||||||
|
assert.ifError(err);
|
||||||
|
assert.equal(res.statusCode, 400);
|
||||||
|
request.post(nconf.get('url') + '/compose', {
|
||||||
|
form: {
|
||||||
|
tid: tid,
|
||||||
|
},
|
||||||
|
jar: jar,
|
||||||
|
headers: {
|
||||||
|
'x-csrf-token': csrf_token,
|
||||||
|
},
|
||||||
}, function (err, res, body) {
|
}, function (err, res, body) {
|
||||||
assert.ifError(err);
|
assert.ifError(err);
|
||||||
assert.equal(res.statusCode, 400);
|
assert.equal(res.statusCode, 400);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it('should create a new topic and reply by composer route', function (done) {
|
it('should create a new topic and reply by composer route', function (done) {
|
||||||
var data = {
|
var data = {
|
||||||
|
|||||||
Reference in New Issue
Block a user