Fix "Reset File Sync History"

This commit is contained in:
Dan Stillman 2016-12-22 10:00:40 -05:00
parent cf686c520a
commit ab959cd858
3 changed files with 5 additions and 6 deletions

View file

@ -102,14 +102,14 @@ describe("Zotero.Sync.Storage.Local", function () {
})
})
describe("#resetModeSyncStates()", function () {
describe("#resetAllSyncStates()", function () {
it("should reset attachment sync states to 'to_upload'", function* () {
var attachment = yield importFileAttachment('test.png');
attachment.attachmentSyncState = 'in_sync';
yield attachment.saveTx();
var local = Zotero.Sync.Storage.Local;
yield local.resetModeSyncStates()
yield local.resetAllSyncStates()
assert.strictEqual(attachment.attachmentSyncState, local.SYNC_STATE_TO_UPLOAD);
var state = yield Zotero.DB.valueQueryAsync(
"SELECT syncState FROM itemAttachments WHERE itemID=?", attachment.id