diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js
index 6b28a02989..be848e0e0b 100644
--- a/apps/files/tests/js/filelistSpec.js
+++ b/apps/files/tests/js/filelistSpec.js
@@ -21,11 +21,14 @@
describe('FileList tests', function() {
beforeEach(function() {
// init horrible parameters
- $('').append('body');
- $('').append('body');
+ var $body = $('body');
+ $body.append('');
+ $body.append('');
+ // dummy files table
+ $body.append('
');
});
afterEach(function() {
- $('#dir, #permissions').remove();
+ $('#dir, #permissions, #filestable').remove();
});
it('generates file element with correct attributes when calling addFile', function() {
var lastMod = new Date(10000);
@@ -36,7 +39,7 @@ describe('FileList tests', function() {
expect($tr.attr('data-type')).toEqual('file');
expect($tr.attr('data-file')).toEqual('testName.txt');
expect($tr.attr('data-size')).toEqual('1234');
- //expect($tr.attr('data-permissions')).toEqual('31');
+ expect($tr.attr('data-permissions')).toEqual('31');
//expect($tr.attr('data-mime')).toEqual('plain/text');
});
it('generates dir element with correct attributes when calling addDir', function() {
@@ -48,7 +51,7 @@ describe('FileList tests', function() {
expect($tr.attr('data-type')).toEqual('dir');
expect($tr.attr('data-file')).toEqual('testFolder');
expect($tr.attr('data-size')).toEqual('1234');
- //expect($tr.attr('data-permissions')).toEqual('31');
+ expect($tr.attr('data-permissions')).toEqual('31');
//expect($tr.attr('data-mime')).toEqual('httpd/unix-directory');
});
});