2015-05-22 20:04:16 +00:00
|
|
|
describe("Zotero.Groups", function () {
|
|
|
|
describe("#get()", function () {
|
|
|
|
it("should retrieve a newly created group", function* () {
|
|
|
|
try {
|
2015-06-02 00:00:25 +00:00
|
|
|
var group = yield createGroup();
|
|
|
|
assert.equal(Zotero.Groups.get(group.id), group)
|
2015-05-22 20:04:16 +00:00
|
|
|
}
|
|
|
|
finally {
|
|
|
|
if (group) {
|
2015-06-07 19:40:04 +00:00
|
|
|
yield Zotero.DB.executeTransaction(function* () {
|
|
|
|
return group.erase();
|
|
|
|
})
|
2015-05-22 20:04:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|