aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/tests/js/filesSpec.js
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-02-05 13:36:55 +0100
committerRobin Appelman <icewind@owncloud.com>2014-02-05 13:36:55 +0100
commit1e79369338e8435952e2eda60a2cfc49bb6c4882 (patch)
tree12d3ac88978887f16e795c54873bbd6b99bb8ee5 /apps/files/tests/js/filesSpec.js
parent3c1ab66edac1ba2f1b398c859cd933c410ea3d8d (diff)
parent3d88b10f201b7979f250b49b10360b3581030ec7 (diff)
downloadnextcloud-server-1e79369338e8435952e2eda60a2cfc49bb6c4882.tar.gz
nextcloud-server-1e79369338e8435952e2eda60a2cfc49bb6c4882.zip
merge master into storagestatistics-reuse
Diffstat (limited to 'apps/files/tests/js/filesSpec.js')
-rw-r--r--apps/files/tests/js/filesSpec.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files/tests/js/filesSpec.js b/apps/files/tests/js/filesSpec.js
index 9d0a2e4f9d7..018c8ef0f3c 100644
--- a/apps/files/tests/js/filesSpec.js
+++ b/apps/files/tests/js/filesSpec.js
@@ -18,6 +18,8 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
+
+/* global Files */
describe('Files tests', function() {
describe('File name validation', function() {
it('Validates correct file names', function() {
@@ -36,12 +38,14 @@ describe('Files tests', function() {
'und Ümläüte sind auch willkommen'
];
for ( var i = 0; i < fileNames.length; i++ ) {
+ var error = false;
try {
expect(Files.isFileNameValid(fileNames[i])).toEqual(true);
}
catch (e) {
- fail();
+ error = e;
}
+ expect(error).toEqual(false);
}
});
it('Detects invalid file names', function() {
@@ -69,7 +73,7 @@ describe('Files tests', function() {
var threwException = false;
try {
Files.isFileNameValid(fileNames[i]);
- fail();
+ console.error('Invalid file name not detected:', fileNames[i]);
}
catch (e) {
threwException = true;