diff options
author | John Christopher Anderson <jchris@apache.org> | 2010-05-13 01:25:51 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2010-05-13 01:25:51 +0000 |
commit | f2292e7f24585b690a6712dd2474cddeb81cc8d3 (patch) | |
tree | aa3c518521d9acdcd6b46abe9789f0bf1b91f321 /test | |
parent | 8aca45b45b116abaa9594fc7f065128b858613d2 (diff) |
vhost_global_handlers bypass rewrite rules and are available in all vhosts
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@943764 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rwxr-xr-x | test/etap/160-vhosts.t | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/etap/160-vhosts.t b/test/etap/160-vhosts.t index 64c51554..8d8dd2a7 100755 --- a/test/etap/160-vhosts.t +++ b/test/etap/160-vhosts.t @@ -54,7 +54,7 @@ config_files() -> main(_) -> test_util:init_code_path(), - etap:plan(3), + etap:plan(4), case (catch test()) of ok -> etap:end_tests(); @@ -85,7 +85,8 @@ test() -> test_regular_request(), test_vhost_request(), test_vhost_request_with_qs(), - + test_vhost_request_with_global(), + %% restart boilerplate couch_db:close(Db), couch_server:delete(list_to_binary(dbname()), []), @@ -119,3 +120,13 @@ test_vhost_request_with_qs() -> etap:is(HasRevsInfo, true, "should return _revs_info"); _Else -> false end. + +test_vhost_request_with_global() -> + Url = server() ++ "_uuids", + case ibrowse:send_req(Url, [], get, [], [{host_header, "example.com"}]) of + {ok, _, _, Body} -> + {JsonProps} = couch_util:json_decode(Body), + HasUuids = proplists:is_defined(<<"uuids">>, JsonProps), + etap:is(HasUuids, true, "should return _uuids"); + _Else -> false + end. |