diff options
Diffstat (limited to 'share/www/script/test/users_db.js')
-rw-r--r-- | share/www/script/test/users_db.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/share/www/script/test/users_db.js b/share/www/script/test/users_db.js index 7648523b1..44e6c8878 100644 --- a/share/www/script/test/users_db.js +++ b/share/www/script/test/users_db.js @@ -112,6 +112,16 @@ couchTests.users_db = function(debug) { } jchrisUserDoc.roles = []; + // "roles" must exist + delete jchrisUserDoc.roles; + try { + usersDb.save(jchrisUserDoc); + T(false && "should only allow us to save doc when roles exists"); + } catch(e) { + T(e.reason == "doc.roles must exist"); + } + jchrisUserDoc.roles = []; + // character : is not allowed in usernames var joeUserDoc = CouchDB.prepareUserDoc({ name: "joe:erlang" |