Blame view

node_modules/mongojs/test/test-get-collection-names.js 348 Bytes
46de8790   Tarpit Grover   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
var insert = require('./insert');

insert('getCollectionNames', [{
  hello:'world'
}], function(db, t, done) {
  db.collection('b').save({hello: "world"}, function(err, b) {
    db.getCollectionNames(function(err, colNames) {
      t.notEqual(colNames.indexOf('a'), -1);
      t.notEqual(colNames.indexOf('b'), -1);
      done();
    });
  });
});