couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From benk...@apache.org
Subject fauxton commit: updated refs/heads/master to 1739a8e
Date Wed, 27 May 2015 16:25:26 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master cffe43a9e -> 1739a8e56


Databases component and test fixes

This fixes a small problem with the mocha test for the databases
component. Because it didn't reset the store it would sometimes
interfere with other mocha tests running. Only seen with the dash.


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

Branch: refs/heads/master
Commit: 1739a8e56e1f5c242aba201d69c03fd60fa5d46f
Parents: cffe43a
Author: Ben Keen <ben.keen@gmail.com>
Authored: Tue May 26 15:48:11 2015 -0700
Committer: Ben Keen <ben.keen@gmail.com>
Committed: Wed May 27 09:26:16 2015 -0700

----------------------------------------------------------------------
 app/addons/databases/stores.js                      | 6 +++++-
 app/addons/databases/tests/componentsSpec.react.jsx | 3 +++
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/1739a8e5/app/addons/databases/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/stores.js b/app/addons/databases/stores.js
index 4da6593..cdae6df 100644
--- a/app/addons/databases/stores.js
+++ b/app/addons/databases/stores.js
@@ -20,7 +20,11 @@ define([
   var DatabasesStore = FauxtonAPI.Store.extend({
 
     initialize: function () {
-      this._collection = {};
+      this.reset();
+    },
+
+    reset: function () {
+      this._collection = new Backbone.Collection();
       this._loading = false;
       this._promptVisible = false;
     },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/1739a8e5/app/addons/databases/tests/componentsSpec.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/databases/tests/componentsSpec.react.jsx b/app/addons/databases/tests/componentsSpec.react.jsx
index c8fd4e4..1e9932a 100644
--- a/app/addons/databases/tests/componentsSpec.react.jsx
+++ b/app/addons/databases/tests/componentsSpec.react.jsx
@@ -204,6 +204,9 @@ define([
       // because of the need to override typeahead, this just does a spy on the componentDidUpdate
method to ensure
       // it gets called
       assert.ok(spy.calledOnce);
+
+      // reset the store for future use
+      Stores.databasesStore.reset();
     });
   });
 


Mime
View raw message