From 2317d7bb497cce3e5731dd43e2e69b9d3e780bb0 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Mon, 24 Apr 2017 10:39:37 +0200 Subject: Fix sinon.stub deprecation warnings Calls to `sinon.stub(obj, 'meth', fn)` are deprecated and therefore replaced by `sinon.stub(obj, 'meth).callsFake(fn)` as instructed by the deprecation warning. This makes the js unit testing output readable again. Signed-off-by: Christoph Wurst --- apps/federatedfilesharing/tests/js/externalSpec.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apps/federatedfilesharing') diff --git a/apps/federatedfilesharing/tests/js/externalSpec.js b/apps/federatedfilesharing/tests/js/externalSpec.js index 362df49252b..596c0ae60ac 100644 --- a/apps/federatedfilesharing/tests/js/externalSpec.js +++ b/apps/federatedfilesharing/tests/js/externalSpec.js @@ -8,6 +8,8 @@ * */ +/* global sinon */ + describe('OCA.Sharing external tests', function() { var plugin; var urlQueryStub; @@ -24,8 +26,8 @@ describe('OCA.Sharing external tests', function() { plugin = OCA.Sharing.ExternalShareDialogPlugin; urlQueryStub = sinon.stub(OC.Util.History, 'parseUrlQuery'); - confirmDialogStub = sinon.stub(OC.dialogs, 'confirm', dummyShowDialog); - promptDialogStub = sinon.stub(OC.dialogs, 'prompt', dummyShowDialog); + confirmDialogStub = sinon.stub(OC.dialogs, 'confirm').callsFake(dummyShowDialog); + promptDialogStub = sinon.stub(OC.dialogs, 'prompt').callsFake(dummyShowDialog); plugin.filesApp = { fileList: { -- cgit v1.2.3