You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by be...@apache.org on 2015/05/27 18:25:26 UTC
fauxton commit: updated refs/heads/master to 1739a8e
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 <be...@gmail.com>
Authored: Tue May 26 15:48:11 2015 -0700
Committer: Ben Keen <be...@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();
});
});