Fix collection export

Closes #734, maybe?
This commit is contained in:
Dan Stillman 2016-03-21 18:11:30 -04:00
parent e8bffc2275
commit 42968949b6
2 changed files with 15 additions and 1 deletions

View file

@ -1156,5 +1156,19 @@ describe("Zotero.Translate.ItemGetter", function() {
}
}));
});
describe("#setCollection()", function () {
it("should add collection items", function* () {
var col = yield createDataObject('collection');
var item1 = yield createDataObject('item', { collections: [col.id] });
var item2 = yield createDataObject('item', { collections: [col.id] });
var item3 = yield createDataObject('item');
let getter = new Zotero.Translate.ItemGetter();
getter.setCollection(col);
assert.equal(getter.numItems, 2);
});
});
});
}