remove more parseInts

This commit is contained in:
Barış Soner Uşaklı
2018-10-21 19:33:46 -04:00
parent 9aa39c91a3
commit ac39112271
13 changed files with 75 additions and 95 deletions

View File

@@ -251,7 +251,7 @@ describe('Post\'s', function () {
assert.ifError(err);
posts.getPostField(replyPid, 'deleted', function (err, isDeleted) {
assert.ifError(err);
assert.equal(parseInt(isDeleted, 10), 1);
assert.strictEqual(isDeleted, 1);
done();
});
});
@@ -262,7 +262,7 @@ describe('Post\'s', function () {
assert.ifError(err);
posts.getPostField(replyPid, 'deleted', function (err, isDeleted) {
assert.ifError(err);
assert.equal(parseInt(isDeleted, 10), 0);
assert.strictEqual(isDeleted, 0);
done();
});
});
@@ -591,6 +591,14 @@ describe('Post\'s', function () {
});
describe('parse', function () {
it('should not crash and return falsy if post data is falsy', function (done) {
posts.parsePost(null, function (err, postData) {
assert.ifError(err);
assert.strictEqual(postData, null);
done();
});
});
it('should store post content in cache', function (done) {
var oldValue = global.env;
global.env = 'production';