Fix collection saving
This commit is contained in:
parent
694896273a
commit
99dfc72a18
2 changed files with 13 additions and 2 deletions
13
test/tests/collectionTest.js
Normal file
13
test/tests/collectionTest.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
describe("Zotero.Collection", function() {
|
||||
describe("#save()", function () {
|
||||
it("should save a new collection", function* () {
|
||||
var name = "Test";
|
||||
|
||||
var collection = new Zotero.Collection;
|
||||
collection.name = name;
|
||||
var id = yield collection.save();
|
||||
collection = yield Zotero.Collections.getAsync(id);
|
||||
assert.equal(collection.name, name);
|
||||
});
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue