diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-12-10 18:08:40 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-02-15 12:48:47 +0100 |
commit | b8b77709c05df3d820af2bfc83ff9d386bc19990 (patch) | |
tree | 68a6f739b0d9f4af62d2169340d2c3b35e30d27a /core/js/tests/specHelper.js | |
parent | 294dcb4efffabc30fb85f50f2e01af2904b476a6 (diff) | |
download | nextcloud-server-b8b77709c05df3d820af2bfc83ff9d386bc19990.tar.gz nextcloud-server-b8b77709c05df3d820af2bfc83ff9d386bc19990.zip |
Add handler for global ajax errors
Diffstat (limited to 'core/js/tests/specHelper.js')
-rw-r--r-- | core/js/tests/specHelper.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/js/tests/specHelper.js b/core/js/tests/specHelper.js index d13691845a7..f9bdeae0d64 100644 --- a/core/js/tests/specHelper.js +++ b/core/js/tests/specHelper.js @@ -116,7 +116,8 @@ window.isPhantom = /phantom/i.test(navigator.userAgent); // global setup for all tests (function setupTests() { var fakeServer = null, - $testArea = null; + $testArea = null, + ajaxErrorStub = null; /** * Utility functions for testing @@ -162,6 +163,8 @@ window.isPhantom = /phantom/i.test(navigator.userAgent); // dummy select2 (which isn't loaded during the tests) $.fn.select2 = function() { return this; }; + + ajaxErrorStub = sinon.stub(OC, '_processAjaxError'); }); afterEach(function() { @@ -172,6 +175,8 @@ window.isPhantom = /phantom/i.test(navigator.userAgent); $testArea.remove(); delete($.fn.select2); + + ajaxErrorStub.restore(); }); })(); |