Skip to content

Commit

Permalink
Add test for chained collection names
Browse files Browse the repository at this point in the history
  • Loading branch information
sorribas committed Sep 2, 2013
1 parent f65a1e8 commit e3f6990
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test-chained-collection-names.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var assert = require('assert');
var mongojs = require('../index');
var db = mongojs('test', ['b.c']);

db.b.c.remove(function() {
db.b.c.save({hello: "world"}, function(err, rs) {
db.b.c.find(function(err, docs) {
assert.equal(docs[0].hello, "world");
db.b.c.remove(function() {
db.close();
});
});
});
});

0 comments on commit e3f6990

Please sign in to comment.