var assert = require('assert')
var mongo = require('../')
var db = mongo('mongodb://read:read@ds031617.mongolab.com:31617/esdiscuss')

before(function (done) {
  this.timeout(10000)
  db._get(done)
})

describe('read only operation', function () {
  it('db.getCollectionNames', function (done) {
    db.getCollectionNames()
      .then(function (names) {
        assert(names.indexOf('contents') != -1)
        assert(names.indexOf('headers') != -1)
        assert(names.indexOf('history') != -1)
        assert(names.indexOf('messages') != -1)
        assert(names.indexOf('topics') != -1)
      })
      .nodeify(done)
  })
  it('db.collection("name").find().limit(10)', function (done) {
    db.collection('headers').find().limit(10)
      .then(function (headers) {
        assert(Array.isArray(headers))
        assert(headers.length === 10)
      })
      .nodeify(done)
  })
})
@@ -875,10 +875,246 @@
 e)%0A  %7D)%0A
+  it('db.collection(%22name%22).find().count()', function (done) %7B%0A    db.collection('headers').count()%0A      .then(function (count) %7B%0A        assert(typeof count === 'number');%0A        assert(count %3E 0);%0A      %7D)%0A      .nodeify(done)%0A  %7D)%0A
 %7D)

Add test case for `count` method