couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michel...@apache.org
Subject fauxton commit: updated refs/heads/master to 6b8ba0a
Date Tue, 21 Apr 2015 17:22:33 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 1b1fb3d76 -> 6b8ba0ac7


Test for error handling in Active Tasks

restores spy if it is defined in active task spec


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/6b8ba0ac
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/6b8ba0ac
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/6b8ba0ac

Branch: refs/heads/master
Commit: 6b8ba0ac7a71424fedad208ae7b0e886f64572b5
Parents: 1b1fb3d
Author: michellephung@gmail.com <michellephung@gmail.com>
Authored: Fri Apr 17 11:38:59 2015 -0400
Committer: michellephung@gmail.com <michellephung@gmail.com>
Committed: Tue Apr 21 13:22:01 2015 -0400

----------------------------------------------------------------------
 .../tests/activetasks.componentsSpec.react.jsx         | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/6b8ba0ac/app/addons/activetasks/tests/activetasks.componentsSpec.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/activetasks/tests/activetasks.componentsSpec.react.jsx b/app/addons/activetasks/tests/activetasks.componentsSpec.react.jsx
index 41aa08a..8257d0a 100644
--- a/app/addons/activetasks/tests/activetasks.componentsSpec.react.jsx
+++ b/app/addons/activetasks/tests/activetasks.componentsSpec.react.jsx
@@ -65,12 +65,23 @@ define([
       });
 
       afterEach(function () {
-        spy.restore();
         React.unmountComponentAtNode(tableDiv);
         window.confirm.restore && window.confirm.restore();
       });
 
+
+      it('it displays a message instead of an empty table, if there are undefined active
tasks', function () {
+        Actions.setCollection(undefined);
+        var tableText = $(table.getDOMNode())[0].innerText;
+        assert.equal(tableText.trim(), 'No active tasks.');
+      });
+
       describe('Active Tasks Filter tray', function () {
+        
+        afterEach(function () {
+          spy.restore();
+        });
+        
         var radioIDs = [
           'Replication',
           'Database-Compaction',


Mime
View raw message