contentFetchNextAttempt: now,
contentUpdated: now,
url: topic.url,
- }
+ };
const result = DB._topicDataToNative(topic);
assert.deepStrictEqual(result, expected);
});
const dbResult1 = {
changes: 1,
lastInsertRowid: undefined,
- }
+ };
const expected = {
changes: 1,
lastInsertRowid: undefined,
const dbResult1 = {
changes: 1,
lastInsertRowid: undefined,
- }
+ };
const expected = {
changes: 1,
lastInsertRowid: undefined,
const dbResult1 = {
changes: 0,
lastInsertRowid: undefined,
- }
+ };
sinon.stub(db.statement.topicAttempts, 'get').returns(dbGet);
sinon.stub(db.statement.topicAttemptsIncrement, 'run').returns(dbResult0);
sinon.stub(db.statement.topicContentFetchDone, 'run').returns(dbResult1);
const dbResult1 = {
changes: 0,
lastInsertRowid: undefined,
- }
+ };
sinon.stub(db.statement.topicAttempts, 'get').returns(dbGet);
sinon.stub(db.statement.topicAttemptsIncrement, 'run').returns(dbResult0);
sinon.stub(db.statement.topicContentFetchDone, 'run').returns(dbResult1);
DB._verificationDataToEngine(data);
assert.strictEqual(data.isPublisherValidated, 0);
});
- }) // _verificationDataToEngine
+ }); // _verificationDataToEngine
describe('verificationInsert', function () {
let verification;
const dbResult = {
changes: 0,
lastInsertRowid: undefined,
- }
+ };
sinon.stub(db.statement.verificationUpdate, 'run').returns(dbResult);
try {
await db.verificationUpdate(dbCtx, verificationId, data);
const dbResult = {
changes: 1,
lastInsertRowid: undefined,
- }
+ };
sinon.stub(db.statement.verificationValidate, 'run').returns(dbResult);
await db.verificationValidated(dbCtx, verificationId);
});
const dbResult = {
changes: 0,
lastInsertRowid: undefined,
- }
+ };
sinon.stub(db.statement.verificationValidate, 'run').returns(dbResult);
try {
await db.verificationValidated(dbCtx, verificationId);