Comparing version 0.1.0 to 0.2.0
0.2.0 / 2013-01-09 | ||
================== | ||
* changed; default db is now 'test' | ||
0.1.0 / 2012-12-18 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -20,3 +20,3 @@ // muri | ||
const DEFAULT_PORT = 27017; | ||
const DEFAULT_DB = 'admin'; | ||
const DEFAULT_DB = 'test'; | ||
@@ -35,3 +35,3 @@ /** | ||
hosts: [] | ||
, db: 'admin' | ||
, db: DEFAULT_DB | ||
, options: {} | ||
@@ -38,0 +38,0 @@ } |
{ | ||
"name": "muri", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "MongoDB URI parser", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -107,7 +107,7 @@ | ||
describe('database', function(){ | ||
it('defaults to admin', function(done){ | ||
it('default', function(done){ | ||
var val = muri('mongodb://localhost/'); | ||
assert.equal('admin', val.db); | ||
assert.equal('test', val.db); | ||
var val = muri('mongodb://localhost'); | ||
assert.equal('admin', val.db); | ||
assert.equal('test', val.db); | ||
done(); | ||
@@ -151,3 +151,3 @@ }) | ||
var val = muri('mongodb://localhost/?readPreferenceTags=dc:ny'); | ||
assert.equal('admin', val.db); | ||
assert.equal('test', val.db); | ||
assert.deepEqual([{ dc: 'ny' }], val.options.readPreferenceTags); | ||
@@ -199,3 +199,3 @@ done(); | ||
var val = muri('mongodb:///tmp/mongodb-27017.sock?safe=false'); | ||
assert.equal(val.db, 'admin') | ||
assert.equal(val.db, 'test') | ||
assert.ok(Array.isArray(val.hosts)); | ||
@@ -222,3 +222,3 @@ assert.equal(1, val.hosts.length); | ||
var val = muri('mongodb://user:password@/tmp/mongodb-27017.sock?safe=false'); | ||
assert.equal(val.db, 'admin') | ||
assert.equal(val.db, 'test') | ||
assert.ok(Array.isArray(val.hosts)); | ||
@@ -245,3 +245,3 @@ assert.equal(1, val.hosts.length); | ||
var val = muri('mongodb://user:password@/tmp/mongodb-27017.sock,/tmp/another-27018.sock?safe=false'); | ||
assert.equal(val.db, 'admin') | ||
assert.equal(val.db, 'test') | ||
assert.ok(Array.isArray(val.hosts)); | ||
@@ -248,0 +248,0 @@ assert.equal(2, val.hosts.length); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18228