Don't set collections: "" in PATCH JSON when changing item to child
This commit is contained in:
parent
5c32962bb1
commit
0803bb84e3
2 changed files with 16 additions and 0 deletions
|
@ -1,6 +1,17 @@
|
|||
"use strict";
|
||||
|
||||
describe("Zotero.DataObjectUtilities", function() {
|
||||
describe("#patch()", function () {
|
||||
it("should omit 'collections' if it doesn't exist", function* () {
|
||||
var patchBase = {
|
||||
collections: ['AAAAAAAA']
|
||||
};
|
||||
var obj = {};
|
||||
obj = Zotero.DataObjectUtilities.patch(patchBase, obj);
|
||||
assert.notProperty(obj, 'collections');
|
||||
})
|
||||
})
|
||||
|
||||
describe("#diff()", function () {
|
||||
// This is mostly covered by syncLocal::_reconcileChanges() tests, but we test some
|
||||
// additional things here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue