Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Zoddy/cushion
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanjudis committed Jun 6, 2013
2 parents 7eed3aa + da61e05 commit beeb2e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions document.js
Expand Up @@ -442,6 +442,8 @@ Document.prototype._saveContent = function(body) {
for (key in body) {
if (key === '_rev') {
this._revision = body[key];
} else if (key === '_id') {
this._id = body[key];
} else {
this._body[key] = body[key];
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "cushion",
"version": "1.6.2",
"version": "1.6.3",
"description": "A CouchDB API for Node.js",
"keywords": [
"couchdb"
Expand Down
2 changes: 2 additions & 0 deletions test/3-document-test.js
Expand Up @@ -40,6 +40,8 @@ exports.tests = [{
'url': ['PUT', config.database + '/' + config.document, {}],
'callback': function(error, document) {
expect(document).to.be.an('object').and.to.have.property('_id');
expect(document._body).to.be.an('object').and.to.not.have.property('_id');
expect(document._body).to.be.an('object').and.to.not.have.property('_rev');
},
}, {
'message': 'load document',
Expand Down

0 comments on commit beeb2e6

Please sign in to comment.