summaryrefslogtreecommitdiff
path: root/test/etap
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2010-11-12 20:17:03 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2010-11-12 20:17:03 +0000
commit0fdfbaedfa757f4f5f3fdf550c6ded9d5a46c464 (patch)
treeda7ab4292d930569a72ca40cc938db0859669b26 /test/etap
parent0264c51de7f281bc3b01d51e43831da2bcc741df (diff)
Proper verification of the request's accepted media types. Uses the new function mochiweb_request:accepts_content_type/1.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1034554 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/etap')
-rwxr-xr-xtest/etap/140-attachment-comp.t12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/etap/140-attachment-comp.t b/test/etap/140-attachment-comp.t
index 98d37abc..1a90bf0b 100755
--- a/test/etap/140-attachment-comp.t
+++ b/test/etap/140-attachment-comp.t
@@ -301,7 +301,8 @@ test_get_1st_png_att_with_accept_encoding_deflate() ->
test_get_doc_with_1st_text_att() ->
{ok, {{_, Code, _}, _Headers, Body}} = http:request(
get,
- {db_url() ++ "/testdoc1?attachments=true", []},
+ {db_url() ++ "/testdoc1?attachments=true",
+ [{"Accept", "application/json"}]},
[],
[{sync, true}]),
etap:is(Code, 200, "HTTP response code is 200"),
@@ -367,7 +368,8 @@ test_1st_text_att_stub() ->
test_get_doc_with_1st_png_att() ->
{ok, {{_, Code, _}, _Headers, Body}} = http:request(
get,
- {db_url() ++ "/testdoc2?attachments=true", []},
+ {db_url() ++ "/testdoc2?attachments=true",
+ [{"Accept", "application/json"}]},
[],
[{sync, true}]),
etap:is(Code, 200, "HTTP response code is 200"),
@@ -492,7 +494,8 @@ test_get_2nd_png_att_with_accept_encoding_gzip() ->
test_get_doc_with_2nd_text_att() ->
{ok, {{_, Code, _}, _Headers, Body}} = http:request(
get,
- {db_url() ++ "/testdoc3?attachments=true", []},
+ {db_url() ++ "/testdoc3?attachments=true",
+ [{"Accept", "application/json"}]},
[],
[{sync, true}]),
etap:is(Code, 200, "HTTP response code is 200"),
@@ -554,7 +557,8 @@ test_2nd_text_att_stub() ->
test_get_doc_with_2nd_png_att() ->
{ok, {{_, Code, _}, _Headers, Body}} = http:request(
get,
- {db_url() ++ "/testdoc4?attachments=true", []},
+ {db_url() ++ "/testdoc4?attachments=true",
+ [{"Accept", "application/json"}]},
[],
[{sync, true}]),
etap:is(Code, 200, "HTTP response code is 200"),