WebDAV file sync overhaul for 5.0
Also: - Remove last-sync-time mechanism for both WebDAV and ZFS, since it can be determined by storage properties (mtime/md5) in data sync - Add option to include synced storage properties in item toJSON() instead of local file properties - Set "Fake-Server-Match" header in setHTTPResponse() test support function, which can be used for request count assertions -- see resetRequestCount() and assertRequestCount() in webdavTest.js - Allow string (e.g., 'to_download') instead of constant in Zotero.Sync.Data.Local.setSyncState() - Misc storage tweaks
This commit is contained in:
parent
6844deba60
commit
c5a9987f37
32 changed files with 3182 additions and 2789 deletions
|
@ -63,26 +63,6 @@ describe("Zotero.Library", function() {
|
|||
});
|
||||
});
|
||||
|
||||
describe("#lastStorageSync", function () {
|
||||
it("should set and get a time in seconds", function* () {
|
||||
var library = yield createGroup();
|
||||
var time = Math.round(new Date().getTime() / 1000);
|
||||
library.lastStorageSync = time;
|
||||
yield library.saveTx();
|
||||
|
||||
var dbTime = yield Zotero.DB.valueQueryAsync(
|
||||
"SELECT lastStorageSync FROM libraries WHERE libraryID=?", library.libraryID
|
||||
);
|
||||
assert.equal(dbTime, time);
|
||||
assert.equal(library.lastStorageSync, time);
|
||||
});
|
||||
|
||||
it("should throw if setting time in milliseconds", function* () {
|
||||
var library = Zotero.Libraries.userLibrary;
|
||||
assert.throws(() => library.lastStorageSync = new Date().getTime(), "timestamp must be in seconds");
|
||||
})
|
||||
})
|
||||
|
||||
describe("#editable", function() {
|
||||
it("should return editable status", function() {
|
||||
let library = Zotero.Libraries.get(Zotero.Libraries.userLibraryID);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue