Skip to content

Commit

Permalink
JS unit tests fix - use toBeUndefined() instead of toEqual(null)
Browse files Browse the repository at this point in the history
  • Loading branch information
MorrisJobke authored and Vincent Petry committed Nov 7, 2014
1 parent 2fb1ed8 commit 32625af
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions apps/files/tests/js/filelistSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@ describe('OCA.Files.FileList tests', function() {

expect($tr).toBeDefined();
expect($tr[0].tagName.toLowerCase()).toEqual('tr');
expect($tr.attr('data-id')).toEqual(null);
expect($tr.attr('data-id')).toBeUndefined();
expect($tr.attr('data-type')).toEqual('file');
expect($tr.attr('data-file')).toEqual('testFile.txt');
expect($tr.attr('data-size')).toEqual(null);
expect($tr.attr('data-etag')).toEqual(null);
expect($tr.attr('data-size')).toBeUndefined();
expect($tr.attr('data-etag')).toBeUndefined();
expect($tr.attr('data-permissions')).toEqual('31');
expect($tr.attr('data-mime')).toEqual(null);
expect($tr.attr('data-mime')).toBeUndefined();
expect($tr.attr('data-mtime')).toEqual('123456');

expect($tr.find('.filesize').text()).toEqual('Pending');
Expand All @@ -239,11 +239,11 @@ describe('OCA.Files.FileList tests', function() {

expect($tr).toBeDefined();
expect($tr[0].tagName.toLowerCase()).toEqual('tr');
expect($tr.attr('data-id')).toEqual(null);
expect($tr.attr('data-id')).toBeUndefined();
expect($tr.attr('data-type')).toEqual('dir');
expect($tr.attr('data-file')).toEqual('testFolder');
expect($tr.attr('data-size')).toEqual(null);
expect($tr.attr('data-etag')).toEqual(null);
expect($tr.attr('data-size')).toBeUndefined();
expect($tr.attr('data-etag')).toBeUndefined();
expect($tr.attr('data-permissions')).toEqual('31');
expect($tr.attr('data-mime')).toEqual('httpd/unix-directory');
expect($tr.attr('data-mtime')).toEqual('123456');
Expand Down

0 comments on commit 32625af

Please sign in to comment.