Fix style download stub

This commit is contained in:
Sylvester Keil 2018-08-03 13:42:15 +02:00
parent fa7a330b0e
commit 37412c68ff
No known key found for this signature in database
GPG key ID: 878933BCEAB25A10

View file

@ -27,8 +27,8 @@ describe("Zotero.Styles", function() {
it("should install the style from url", function* () { it("should install the style from url", function* () {
var getContentsFromURLAsync = Zotero.File.getContentsFromURLAsync; var getContentsFromURLAsync = Zotero.File.getContentsFromURLAsync;
sinon.stub(Zotero.File, 'getContentsFromURLAsync').callsFake(function(style) { sinon.stub(Zotero.File, 'getContentsFromURLAsync').callsFake(function(url) {
if (style.url == styleID) { if (url === styleID) {
return Zotero.Promise.resolve(style); return Zotero.Promise.resolve(style);
} else { } else {
return getContentsFromURLAsync.apply(Zotero.File, arguments); return getContentsFromURLAsync.apply(Zotero.File, arguments);