diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-02-22 17:19:08 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-02-22 17:25:32 +0100 |
commit | 27544144cec06324a5fe4494034e893b7c5a66ff (patch) | |
tree | 36c437db587a801f0533e70e22ca5b4f8d3ec4f2 /apps/files/tests/js | |
parent | 8ea80e114ae508586947db614b37db6b35972a9c (diff) | |
download | nextcloud-server-27544144cec06324a5fe4494034e893b7c5a66ff.tar.gz nextcloud-server-27544144cec06324a5fe4494034e893b7c5a66ff.zip |
Fix unit tests affected by side effects
The notification tests were not restoring the clock properly, but
indirectly helped other tests pass.
Since now we're restoring the clock properly, the other tests were fixed
to still work.
Diffstat (limited to 'apps/files/tests/js')
-rw-r--r-- | apps/files/tests/js/fileactionsSpec.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files/tests/js/fileactionsSpec.js b/apps/files/tests/js/fileactionsSpec.js index a905a4d969d..4f4d4d3d197 100644 --- a/apps/files/tests/js/fileactionsSpec.js +++ b/apps/files/tests/js/fileactionsSpec.js @@ -20,9 +20,10 @@ */ describe('OCA.Files.FileActions tests', function() { - var fileList, fileActions; + var fileList, fileActions, clock; beforeEach(function() { + clock = sinon.useFakeTimers(); // init horrible parameters var $body = $('#testArea'); $body.append('<input type="hidden" id="dir" value="/subdir"></input>'); @@ -63,6 +64,7 @@ describe('OCA.Files.FileActions tests', function() { fileActions = null; fileList.destroy(); fileList = undefined; + clock.restore(); $('#dir, #permissions, #filestable').remove(); }); it('calling clear() clears file actions', function() { |