On Mar 22, 2010, at 3:26 PM, Lena Herrmann wrote: > Am 22.03.10 23:14, schrieb J Chris Anderson: >> >> On Mar 22, 2010, at 3:11 PM, Lena Herrmann wrote: >> >>> Am 22.03.10 22:57, schrieb J Chris Anderson: >>>> >>>> On Mar 22, 2010, at 2:43 PM, Lena Herrmann wrote: >>>> >>>>> Hi, >>>>> >>>>> I still have the same problem. Now I ran out of things to try. >>>>> >>>>> Here is the code: http://gist.github.com/340562 >>>>> >>>> >>>> Looking at this I'm seeing that roles needs to be an array. >>>> >>>> Can you show the output of prepareUserDoc()? >>> >>> var userDoc = CouchDB.prepareUserDoc({name: "gaius", roles: "president"}, >>> "secretpass"); >>> console.log(JSON.stringify(userDoc)) => >>> {"name":"gaius","roles":"president","_id":"org.couchdb.user:gaius","salt":"959de325fdcffa2c5a7fad920b7eac5a","password_sha":"b6bedfb721bd4c786910319944faba0bc18a2f35","type":"user"} >>> >> >> All I can think is that there's an issue with the sha1 function giving >> different output in your environment. > >
Figured it out! You need to either save the userDoc to the userDB, or config the couch to use an alternate database for the usersDb for your test. See run_on_modified_server in the cookie_auth test for usage. Chris
