Created
April 2, 2010 11:28
-
-
Save kilaulena/353043 to your computer and use it in GitHub Desktop.
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
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