developmentseed/backbone-couch — Issue #7: The test script can't pass !!
Author: jackey
Created: 2012-01-31 10:08:55+00:00
State: open

run: npm test

it has error:

Error: Error: badarg
at /Users/Jackey/Workspace/embarq/node_modules/backbone-couch/test/test.js:9:23
at /Users/Jackey/Workspace/embarq/node_modules/backbone-couch/node_modules/backbone/backbone.js:1137:9
at /Users/Jackey/Workspace/embarq/node_modules/backbone-couch/backbone-couch.js:55:37
at [object Object].callback (/Users/Jackey/Workspace/embarq/node_modules/backbone-couch/couch.js:34:21)
at [object Object]. (/Users/Jackey/Workspace/embarq/node_modules/backbone-couch/node_modules/request/main.js:290:21)
at [object Object].emit (events.js:64:17)
at IncomingMessage. (/Users/Jackey/Workspace/embarq/node_modules/backbone-couch/node_modules/request/main.js:278:54)
at IncomingMessage.emit (events.js:81:20)
at HTTPParser.onMessageComplete (http.js:133:23)
at Socket.ondata (http.js:1228:22)

This is the output of couchDB:
[info] [<0.19199.2>] 127.0.0.1 - - 'PUT' /backbone_couch_test_custom/%2Fapi%2FNumber%2Ftwo 201
[error] [<0.19200.2>] Badarg error in HTTP request
[info] [<0.19200.2>] Stacktrace: [{erlang,iolist_to_binary,[true]},
{couch_httpd_rewrite,
'-maybe_encode_bindings/1-fun-0-',2},
{lists,foldl,3},
{couch_httpd_rewrite,handle_rewrite_req,3},
{couch_httpd_db,do_db_req,2},
{couch_httpd,handle_request_int,5},
{mochiweb_http,headers,5},
{proc_lib,init_p_do_apply,3}]
[info] [<0.19200.2>] 127.0.0.1 - - 'GET' /backbone_couch_test_custom/_design/backbone/_rewrite/api/Number/? 500

What's the couchDB version that project rely on ? I think the bug is from rewrite handler of couchDB.