Fix test failure after 27cb099c82

Attachments are now saved before the connector server responds, because they're
no longer started out-of-band in saveItems(). This is necessary to prevent
transaction badness during imports, but it may not be what we want for the
connector, so we may want to revisit this after further testing.
This commit is contained in:
Dan Stillman 2017-02-09 02:17:09 -05:00
parent 3a0e0cb088
commit 0570c2edc7

View file

@ -133,7 +133,7 @@ describe("Connector Server", function () {
); );
var promise = waitForItemEvent('add'); var promise = waitForItemEvent('add');
var req = yield Zotero.HTTP.request( var reqPromise = Zotero.HTTP.request(
'POST', 'POST',
connectorServerPath + "/connector/saveItems", connectorServerPath + "/connector/saveItems",
{ {
@ -160,6 +160,9 @@ describe("Connector Server", function () {
// Wait until indexing is done // Wait until indexing is done
yield waitForItemEvent('refresh'); yield waitForItemEvent('refresh');
var req = yield reqPromise;
assert.equal(req.status, 201);
}); });