diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-02-19 11:23:01 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-03-09 10:38:38 +0100 |
commit | abacfd84dad4334e26b44b367127d45fdaf3fde6 (patch) | |
tree | 7c62737844472505eb68426fbcd3edbdb8dc0a91 /apps | |
parent | e28d314b53b82d5b71d16b7749563337d562dbe5 (diff) | |
download | nextcloud-server-abacfd84dad4334e26b44b367127d45fdaf3fde6.tar.gz nextcloud-server-abacfd84dad4334e26b44b367127d45fdaf3fde6.zip |
fixing js unit tests
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/files.js | 8 | ||||
-rw-r--r-- | apps/files/tests/js/fileUploadSpec.js | 13 | ||||
-rw-r--r-- | apps/files/tests/js/filesSpec.js | 10 |
3 files changed, 0 insertions, 31 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index ddb2a80259c..e63c3cad52e 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -102,14 +102,6 @@ } else if (trimmedName.length === 0) { throw t('files', 'File name cannot be empty.'); } - // check for invalid characters - //var invalidCharacters = - // ['\\', '/', '<', '>', ':', '"', '|', '?', '*', '\n']; - //for (var i = 0; i < invalidCharacters.length; i++) { - // if (trimmedName.indexOf(invalidCharacters[i]) !== -1) { - // throw t('files', "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed."); - // } - //} return true; }, displayStorageWarnings: function() { diff --git a/apps/files/tests/js/fileUploadSpec.js b/apps/files/tests/js/fileUploadSpec.js index 2b4341ef1c3..49b7265ced1 100644 --- a/apps/files/tests/js/fileUploadSpec.js +++ b/apps/files/tests/js/fileUploadSpec.js @@ -110,18 +110,5 @@ describe('OC.Upload tests', function() { 'Not enough free space, you are uploading 5 kB but only 1000 B is left' ); }); - it('does not add file if it has invalid characters', function() { - var result; - testFile.name = 'stars*stars.txt'; - - result = addFile(testFile); - - expect(result).toEqual(false); - expect(failStub.calledOnce).toEqual(true); - expect(failStub.getCall(0).args[1].textStatus).toEqual('invalidcharacters'); - expect(failStub.getCall(0).args[1].errorThrown.substr(0, 12)).toEqual( - 'Invalid name' - ); - }); }); }); diff --git a/apps/files/tests/js/filesSpec.js b/apps/files/tests/js/filesSpec.js index 4f8d5a29318..f20ba03e2f1 100644 --- a/apps/files/tests/js/filesSpec.js +++ b/apps/files/tests/js/filesSpec.js @@ -55,16 +55,6 @@ describe('OCA.Files.Files tests', function() { ' ', '.', '..', - 'back\\slash', - 'sl/ash', - 'lt<lt', - 'gt>gt', - 'col:on', - 'double"quote', - 'pi|pe', - 'dont?ask?questions?', - 'super*star', - 'new\nline', ' ..', '.. ', '. ', |