commit 88a18273323be6b4aa83e3faaf5032744d6da884
parent 1c90a772989a5f632f9e348ff097144e26d7560d
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 26 Apr 2016 21:32:18 -0400
Fix test failures
Diffstat:
2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/test/tests/syncLocalTest.js b/test/tests/syncLocalTest.js
@@ -22,20 +22,33 @@ describe("Zotero.Sync.Data.Local", function() {
describe("#checkUser()", function () {
+ var win;
+
+ beforeEach(function* () {
+ win = yield loadBrowserWindow();
+ });
+
+ afterEach(function () {
+ win.close();
+ });
+
it("should prompt for user update and perform on accept", function* () {
yield Zotero.Users.setCurrentUserID(1);
yield Zotero.Users.setCurrentUsername("A");
+ var handled = false;
waitForDialog(function (dialog) {
var text = dialog.document.documentElement.textContent;
- var matches = text.match(/'[^']*'/g);
+ var matches = text.match(/‘[^’]*’/g);
assert.equal(matches.length, 4);
- assert.equal(matches[0], "'A'");
- assert.equal(matches[1], "'B'");
- assert.equal(matches[2], "'B'");
- assert.equal(matches[3], "'A'");
+ assert.equal(matches[0], "‘A’");
+ assert.equal(matches[1], "‘B’");
+ assert.equal(matches[2], "‘B’");
+ assert.equal(matches[3], "‘A’");
+ handled = true;
});
var cont = yield Zotero.Sync.Data.Local.checkUser(win, 2, "B");
+ assert.isTrue(handled);
assert.isTrue(cont);
assert.equal(Zotero.Users.getCurrentUserID(), 2);
diff --git a/test/tests/zfsTest.js b/test/tests/zfsTest.js
@@ -856,7 +856,7 @@ describe("Zotero.Sync.Storage.Mode.ZFS", function () {
}));
assert.ok(e);
assert.equal(e.errorType, 'warning');
- assert.include(e.message, 'would exceed your');
+ assert.include(e.message, 'test.png');
})
})
})