[Http-webtest-commits] HTTP-WebTest-Recorder/t 03-actions.t,1.3,1.4
Brought to you by:
m_ilya,
richardanderson
From: Ilya M. <m_...@us...> - 2003-02-02 17:27:45
|
Update of /cvsroot/http-webtest/HTTP-WebTest-Recorder/t In directory sc8-pr-cvs1:/tmp/cvs-serv23429/t Modified Files: 03-actions.t Log Message: Support text view of content body Index: 03-actions.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest-Recorder/t/03-actions.t,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** 03-actions.t 2 Feb 2003 00:02:42 -0000 1.3 --- 03-actions.t 2 Feb 2003 17:27:41 -0000 1.4 *************** *** 6,10 **** use HTTP::Status; ! use Test::More tests => 31; use Test::Exception; --- 6,10 ---- use HTTP::Status; ! use Test::More tests => 32; use Test::Exception; *************** *** 163,167 **** # test response_content_action() { ! $CONTROLLER->cgi(CGI->new({num => 0})); dies_ok { response_content_action($CONTROLLER) } 'Expect raw response'; isa_ok($@, 'HTTP::WebTest::Recorder::Exception::RawResponse', --- 163,167 ---- # test response_content_action() { ! $CONTROLLER->cgi(CGI->new({num => 0, view => 'raw'})); dies_ok { response_content_action($CONTROLLER) } 'Expect raw response'; isa_ok($@, 'HTTP::WebTest::Recorder::Exception::RawResponse', *************** *** 173,177 **** 'Test headers property of exception'); ! $CONTROLLER->cgi(CGI->new({num => 2})); dies_ok { response_content_action($CONTROLLER) } 'Expect raw response'; isa_ok($@, 'HTTP::WebTest::Recorder::Exception::RawResponse', --- 173,177 ---- 'Test headers property of exception'); ! $CONTROLLER->cgi(CGI->new({num => 2, view => 'raw'})); dies_ok { response_content_action($CONTROLLER) } 'Expect raw response'; isa_ok($@, 'HTTP::WebTest::Recorder::Exception::RawResponse', *************** *** 182,184 **** --- 182,189 ---- [ 'Content-Type' => 'text/plain' ], 'Test headers property of exception'); + + $CONTROLLER->cgi(CGI->new({num => 0, view => 'text'})); + my %data = response_content_action($CONTROLLER); + is($data{content}, $RECORDER->tests->[0]->response->content, + "Test if action doesn't die and returns response content"); } |