This repository was archived by the owner on May 17, 2021. It is now read-only.
File tree
Expand file treeCollapse file tree3 files changed
+11
-10
lines changed Expand file treeCollapse file tree3 files changed
+11
-10
lines changed Original file line number | Diff line number | Diff line change |
---|
@@ -420,9 +420,8 @@ function listCollections(done, results) {
|
420 | 420 | var databases = results.databases;
|
421 | 421 |
|
422 | 422 | // merge and de-dupe databases
|
423 |
| -var dbnames = _.pick(databases, 'name'); |
424 |
| -var tasks = _.map(dbnames, function(name) { |
425 |
| -return getDatabaseCollections.bind(null, db.db(name)); |
| 423 | +var tasks = _.map(databases, function(_db) { |
| 424 | +return getDatabaseCollections.bind(null, db.db(_db.name)); |
426 | 425 | });
|
427 | 426 |
|
428 | 427 | async.parallel(tasks, function(err, res) {
|
|
Original file line number | Diff line number | Diff line change |
---|
@@ -112,13 +112,15 @@ var Instance = AmpersandModel.extend({
|
112 | 112 | props: true,
|
113 | 113 | derived: true
|
114 | 114 | }, true);
|
| 115 | + |
| 116 | +var model = this; |
115 | 117 | if (this.databases.length > 0) {
|
116 |
| -_.each(this._children, function(value, key) { |
117 |
| -res[key] = this[key].serialize(); |
118 |
| -}, this); |
119 |
| -_.each(this._collections, function(value, key) { |
120 |
| -res[key] = this[key].serialize(); |
121 |
| -}, this); |
| 118 | +_.each(model._children, function(value, key) { |
| 119 | +res[key] = model[key].serialize(); |
| 120 | +}); |
| 121 | +_.each(model._collections, function(value, key) { |
| 122 | +res[key] = model[key].serialize(); |
| 123 | +}); |
122 | 124 | }
|
123 | 125 | return res;
|
124 | 126 | }
|
|
Original file line number | Diff line number | Diff line change |
---|
@@ -254,7 +254,7 @@ describe('fetch-mocked', function() {
|
254 | 254 | ];
|
255 | 255 | });
|
256 | 256 |
|
257 |
| -it.skip('should lists all collections for each listable db', function(done) { |
| 257 | +it('should lists all collections for each listable db', function(done) { |
258 | 258 | results.userInfo = fixtures.USER_INFO_JOHN;
|
259 | 259 | results.db = makeMockDB(null, [{
|
260 | 260 | 'name': 'testCol'
|
|
You can’t perform that action at this time.
0 commit comments