[Http-webtest-commits] HTTP-WebTest-Recorder/t 01-recorder.t,1.1.1.1,1.2
Brought to you by:
m_ilya,
richardanderson
From: Ilya M. <m_...@us...> - 2003-01-15 21:15:31
|
Update of /cvsroot/http-webtest/HTTP-WebTest-Recorder/t In directory sc8-pr-cvs1:/tmp/cvs-serv13166/t Modified Files: 01-recorder.t Log Message: Tests for ui_path Index: 01-recorder.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest-Recorder/t/01-recorder.t,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 01-recorder.t 3 Jan 2003 23:01:15 -0000 1.1.1.1 --- 01-recorder.t 15 Jan 2003 21:15:28 -0000 1.2 *************** *** 7,11 **** use HTTP::WebTest::SelfTest; ! use Test::More tests => 21; # get test template files directory included in search path --- 7,11 ---- use HTTP::WebTest::SelfTest; ! use Test::More tests => 31; # get test template files directory included in search path *************** *** 79,82 **** --- 79,96 ---- like($response->content, qr/This is a test file/, 'Check content of response'); + } + + # test constructor with parameter 'path' + { + for my $ui_path (qw(xxx [yyy] /zzz/ /a b/)) { + my $ui_path = $ui_path; + $ui_path =~ s|^ / (.*?) / $|$1|x; + my $recorder = new HTTP::WebTest::Recorder(ui_path => $ui_path); + my $request = GET "http://localhost/$ui_path/testme"; + my $response = $recorder->handle($request); + is($response->code, RC_OK, 'Expect success code'); + like($response->content, qr/This is a test file/, + 'Check content of response'); + } } |