-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
103 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"author": "Charles Davison <[email protected]>", | ||
"name": "pow-mongodb-fixtures", | ||
"description": "Easy JSON fixture loading for MongoDB. Makes managing document relationships easier.", | ||
"version": "0.9.0", | ||
"version": "0.10.0", | ||
"repository": { | ||
"type" : "git", | ||
"url" : "http://github.com/powmedia/pow-mongodb-fixtures.git" | ||
|
@@ -15,7 +15,7 @@ | |
}, | ||
"dependencies": { | ||
"async": "0.1.15", | ||
"mongodb": ">=0.9.9-8", | ||
"mongodb": ">=1.3.0", | ||
"underscore": ">=1.2.2", | ||
"bson": ">=0.0.4", | ||
"optimist": "0.3.5" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,38 @@ exports['createObjectId'] = { | |
}; | ||
|
||
|
||
exports['connect with dbName'] = function(test) { | ||
var loader = fixtures.connect(dbName); | ||
|
||
var options = loader.options; | ||
|
||
test.same(options.db, 'pow-mongodb-fixtures-test'); | ||
test.same(options.host, 'localhost'); | ||
test.same(options.port, 27017); | ||
test.same(options.user, null); | ||
test.same(options.pass, null); | ||
test.same(options.safe, true); | ||
|
||
test.done(); | ||
} | ||
|
||
|
||
exports['connect with uri'] = function(test) { | ||
var loader = fixtures.connect('mongodb://username:[email protected]:9191/dbname'); | ||
|
||
var options = loader.options; | ||
|
||
test.same(options.db, 'dbname'); | ||
test.same(options.host, 'example.com'); | ||
test.same(options.port, 9191); | ||
test.same(options.user, 'username'); | ||
test.same(options.pass, 'password'); | ||
test.same(options.safe, true); | ||
|
||
test.done(); | ||
} | ||
|
||
|
||
exports['works when referencing an objectID in different scope'] = { | ||
'when using this': function(test) { | ||
var todo = 'TODO: Havent been able to replicate error yet:'; | ||
|