Skip to content

Commit

Permalink
Failing unit test for vhosts with a path
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Smith (air) committed Feb 29, 2012
1 parent 33db943 commit 9f90fe4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion share/www/script/test/rewrite.js
Expand Up @@ -445,7 +445,9 @@ couchTests.rewrite = function(debug) {
rewrites: [
{"from":"testShow", "to":"_show/show_requested_path"},
{"from":"path/testShow","to":"_show/show_requested_path"},
{"from":"_config/*","to":"../../../_config/*"},

{"from":"_config/*" , "to":"../../../_config/*"},
{"from":"path/_config/*", "to":"../../../_config/*"},

{"from":"one", "to":"_rewrite/two"},
{"from":"two", "to":"_rewrite/three"},
Expand Down Expand Up @@ -492,5 +494,12 @@ couchTests.rewrite = function(debug) {
var res = CouchDB.request("GET", "/testShow");
TEquals('/testShow', res.responseText, "requested_path should equal requested");
});

// Test the controversial vost with a path.
vhosts.key = encodeURIComponent(CouchDB.host + '/path');
run_on_modified_server([vhosts], function() {
var res = CouchDB.request("GET", "/path/testShow");
TEquals('/path/testShow', res.responseText, "requested_path should equal requested");
});
});
}

0 comments on commit 9f90fe4

Please sign in to comment.