Fix tests

This commit is contained in:
yflory 2017-12-01 14:56:34 +01:00
parent 04e02871bc
commit c6b8bbea59
2 changed files with 7 additions and 2 deletions

View file

@ -486,7 +486,6 @@ define([
// FILES DATA
exp.pushData = function (data, cb) {
if (!pinPads) { return; }
if (typeof cb !== "function") { cb = function () {}; }
var todo = function () {
var id = Util.createRandomInteger();
@ -496,6 +495,7 @@ define([
if (!loggedIn || !AppConfig.enablePinning || config.testMode) {
return void todo();
}
if (!pinPads) { return; }
pinPads([Hash.hrefToHexChannelId(data.href)], function (obj) {
if (obj && obj.error) { return void cb(obj.error); }
todo();

View file

@ -325,7 +325,12 @@ define([
var fo = FO.init(files, config);
fo.fixFiles();
var data = Cryptpad.makePad(href5, 'Title5');
var data = {
href: href5,
title: 'Title5',
atime: +new Date(),
ctime: +new Date()
};
var res;
var id5;
// pushData is synchronous in test mode (no pinning)