Fix style download stub
This commit is contained in:
parent
fa7a330b0e
commit
37412c68ff
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue