From 0fdfbaedfa757f4f5f3fdf550c6ded9d5a46c464 Mon Sep 17 00:00:00 2001 From: Filipe David Borba Manana Date: Fri, 12 Nov 2010 20:17:03 +0000 Subject: 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 --- test/etap/140-attachment-comp.t | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'test') 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"), -- cgit v1.2.3