www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 208d470531ca83b0f89dfa9ff4193f12858e6247
parent daf4a8fe4db46ed29de2babed79610a2522821df
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon,  7 Mar 2016 17:13:30 -0500

Fix test failures

Diffstat:
Mtest/tests/itemTest.js | 14+++++---------
Mtest/tests/utilitiesTest.js | 1+
2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/test/tests/itemTest.js b/test/tests/itemTest.js @@ -609,11 +609,8 @@ describe("Zotero.Item", function () { // File should be flagged for upload // DEBUG: Is this necessary? - assert.equal( - (yield Zotero.Sync.Storage.Local.getSyncState(item.id)), - Zotero.Sync.Storage.Local.SYNC_STATE_TO_UPLOAD - ); - assert.isNull(yield Zotero.Sync.Storage.Local.getSyncedHash(item.id)); + assert.equal(item.attachmentSyncState, Zotero.Sync.Storage.Local.SYNC_STATE_TO_UPLOAD); + assert.isNull(item.attachmentSyncedHash); }) }) @@ -897,10 +894,9 @@ describe("Zotero.Item", function () { var mtime = new Date().getTime(); var md5 = 'b32e33f529942d73bea4ed112310f804'; - yield Zotero.DB.executeTransaction(function* () { - yield Zotero.Sync.Storage.Local.setSyncedModificationTime(item.id, mtime); - yield Zotero.Sync.Storage.Local.setSyncedHash(item.id, md5); - }); + item.attachmentSyncedModificationTime = mtime; + item.attachmentSyncedHash = md5; + yield item.saveTx({ skipAll: true }); var json = item.toJSON({ syncedStorageProperties: true diff --git a/test/tests/utilitiesTest.js b/test/tests/utilitiesTest.js @@ -359,6 +359,7 @@ describe("Zotero.Utilities", function() { }); describe("itemFromCSLJSON", function () { it("should stably perform itemToCSLJSON -> itemFromCSLJSON -> itemToCSLJSON", function* () { + this.timeout(10000); let data = loadSampleData('citeProcJSExport'); for (let i in data) {