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* () {
|
||||
var getContentsFromURLAsync = Zotero.File.getContentsFromURLAsync;
|
||||
sinon.stub(Zotero.File, 'getContentsFromURLAsync').callsFake(function(style) {
|
||||
if (style.url == styleID) {
|
||||
sinon.stub(Zotero.File, 'getContentsFromURLAsync').callsFake(function(url) {
|
||||
if (url === styleID) {
|
||||
return Zotero.Promise.resolve(style);
|
||||
} else {
|
||||
return getContentsFromURLAsync.apply(Zotero.File, arguments);
|
||||
|
|
Loading…
Reference in a new issue