Skip to content

Instantly share code, notes, and snippets.

@kilaulena
Created April 2, 2010 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kilaulena/353043 to your computer and use it in GitHub Desktop.
Save kilaulena/353043 to your computer and use it in GitHub Desktop.
describe 'copyDoc'
before_each
doc = {"Name" : "Sharon Agathon", "Callsign" : "Athena", "_id" : "123"};
db.saveDoc(doc);
end
it 'should result in another document with same data and new id'
db.copyDoc({_id: "123"}, {
success: function(resp){
console.log(resp, 'resp copyDoc')
},
error: function(status, error, reason){
status.should.not.eql 500
error.should.not.eql "unknown_error"
reason.should.not.eql "badarg"
}
}, {
headers: {"Destination":"456"}
});
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment