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/files_external/tests/js/settingsSpec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/files_external/tests/js/settingsSpec.js') diff --git a/apps/files_external/tests/js/settingsSpec.js b/apps/files_external/tests/js/settingsSpec.js index 2639f634b26..d6b96a47189 100644 --- a/apps/files_external/tests/js/settingsSpec.js +++ b/apps/files_external/tests/js/settingsSpec.js @@ -15,7 +15,7 @@ describe('OCA.External.Settings tests', function() { beforeEach(function() { clock = sinon.useFakeTimers(); - select2Stub = sinon.stub($.fn, 'select2', function(args) { + select2Stub = sinon.stub($.fn, 'select2').callsFake(function(args) { if (args === 'val') { return select2ApplicableUsers; } -- cgit v1.2.3