[Pkg-owncloud-commits] [owncloud] 155/199: Add unit tests for	fileActionsReady
    David Prévot 
    taffit at moszumanska.debian.org
       
    Sun Jun  1 18:53:21 UTC 2014
    
    
  
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 89ff2857fc713d4ff5a635d87aef1a213d30d8e9
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Mon May 19 18:48:48 2014 +0200
    Add unit tests for fileActionsReady
---
 apps/files/tests/js/filelistSpec.js | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js
index a3dc5b2..3dd7152 100644
--- a/apps/files/tests/js/filelistSpec.js
+++ b/apps/files/tests/js/filelistSpec.js
@@ -753,6 +753,20 @@ describe('OCA.Files.FileList tests', function() {
 			fileList.setFiles(testFiles);
 			expect(handler.calledOnce).toEqual(true);
 		});
+		it('triggers "fileActionsReady" event after single add', function() {
+			var handler = sinon.stub();
+			fileList.setFiles(testFiles);
+			fileList.$fileList.on('fileActionsReady', handler);
+			fileList.add({name: 'test.txt'});
+			expect(handler.calledOnce).toEqual(true);
+		});
+		it('does not trigger "fileActionsReady" event after single add with silent argument', function() {
+			var handler = sinon.stub();
+			fileList.setFiles(testFiles);
+			fileList.$fileList.on('fileActionsReady', handler);
+			fileList.add({name: 'test.txt'}, {silent: true});
+			expect(handler.notCalled).toEqual(true);
+		});
 		it('triggers "updated" event after update', function() {
 			var handler = sinon.stub();
 			fileList.$fileList.on('updated', handler);
-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
    
    
More information about the Pkg-owncloud-commits
mailing list