diff options
author | Jan Lehnardt <jan@apache.org> | 2013-01-26 18:14:42 +0100 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2013-01-26 18:27:49 +0100 |
commit | 5d92ae8fa9bfb1c21fb4d974671cf6ae3f5b409a (patch) | |
tree | 9e4025cf7b23022fb3c24f4013ac6336050e5712 /share/www/script | |
parent | 93f58e8adcb04555df7da400ed21800cb97ba19c (diff) | |
download | couchdb-5d92ae8fa9bfb1c21fb4d974671cf6ae3f5b409a.tar.gz |
Avoid badmatch when replicator dbnames have leading slashes.
Closes COUCHDB-317
Patch by Joan Touzet.
Diffstat (limited to 'share/www/script')
-rw-r--r-- | share/www/script/test/replication.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/share/www/script/test/replication.js b/share/www/script/test/replication.js index 2b23af5f2..fd60dd41b 100644 --- a/share/www/script/test/replication.js +++ b/share/www/script/test/replication.js @@ -497,6 +497,15 @@ couchTests.replication = function(debug) { } catch (x) { TEquals("db_not_found", x.error); } + + // validate COUCHDB-317 + try { + CouchDB.replicate("/foobar", "test_suite_db"); + T(false, "should have failed with db_not_found error"); + } catch (x) { + TEquals("db_not_found", x.error); + } + try { CouchDB.replicate(CouchDB.protocol + host + "/foobar", "test_suite_db"); T(false, "should have failed with db_not_found error"); |