chris-l / mock-couch

A node.js module designed to mock a CouchDB server, mostly for unit testing purposes.
http://chris-l.github.io/mock-couch/
67 stars 44 forks source link

Add HEAD requests for _all_dbs, _all_docs, datebases, and documents #4

Closed davidwood closed 10 years ago

davidwood commented 10 years ago

HEAD requests are useful for testing existence of databases and documents, so I've added them as HTTP methods. Only returning the headers is handled automatically by Restify, so I didn't add unit tests of the HTTP interface.

I also took the opportunity to consolidate requires in instances where the handler function is used more than once.

chris-l commented 10 years ago

Thanks! Yes, I still don't have tests for the HTTP interface, pretty much because restify handles that, but I'll add such tests eventually. Thanks again!