Update of /cvsroot/http-webtest/HTTP-WebTest-Recorder/t
In directory sc8-pr-cvs1:/tmp/cvs-serv26219/t
Modified Files:
07-action-enable.t 06-action-wtscript.t 05-action-request.t
04-action-list.t 03-action.t 02-controller.t 01-recorder.t
Log Message:
Move everything in HTTP::WebTest::Recorder namespace
Index: 07-action-enable.t
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest-Recorder/t/07-action-enable.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** 07-action-enable.t 24 Jan 2003 09:21:44 -0000 1.1
--- 07-action-enable.t 25 Jan 2003 14:54:51 -0000 1.2
***************
*** 10,22 ****
use Test::Exception;
! require_ok('HTTP::WebTest::Action::Enable');
! require_ok('HTTP::WebTest::Controller');
require_ok('HTTP::WebTest::Recorder');
# test constructors
! my $ACTION = new HTTP::WebTest::Action::Enable;
! isa_ok($ACTION, 'HTTP::WebTest::Action::Enable');
! my $CONTROLLER = new HTTP::WebTest::Controller;
! isa_ok($CONTROLLER, 'HTTP::WebTest::Controller');
my $RECORDER = new HTTP::WebTest::Recorder;
isa_ok($RECORDER, 'HTTP::WebTest::Recorder');
--- 10,22 ----
use Test::Exception;
! require_ok('HTTP::WebTest::Recorder::Action::Enable');
! require_ok('HTTP::WebTest::Recorder::Controller');
require_ok('HTTP::WebTest::Recorder');
# test constructors
! my $ACTION = new HTTP::WebTest::Recorder::Action::Enable;
! isa_ok($ACTION, 'HTTP::WebTest::Recorder::Action::Enable');
! my $CONTROLLER = new HTTP::WebTest::Recorder::Controller;
! isa_ok($CONTROLLER, 'HTTP::WebTest::Recorder::Controller');
my $RECORDER = new HTTP::WebTest::Recorder;
isa_ok($RECORDER, 'HTTP::WebTest::Recorder');
***************
*** 27,31 ****
$CONTROLLER->cgi(CGI->new({ enable => 1 }));
dies_ok { $ACTION->execute($CONTROLLER) } 'Expect redirect';
! isa_ok($@, 'HTTP::WebTest::Exception::Redirect',
'Verify exception class');
is($@->url, 'list', 'Test url property of exception');
--- 27,31 ----
$CONTROLLER->cgi(CGI->new({ enable => 1 }));
dies_ok { $ACTION->execute($CONTROLLER) } 'Expect redirect';
! isa_ok($@, 'HTTP::WebTest::Recorder::Exception::Redirect',
'Verify exception class');
is($@->url, 'list', 'Test url property of exception');
***************
*** 37,41 ****
$CONTROLLER->cgi(CGI->new({ enable => 0 }));
dies_ok { $ACTION->execute($CONTROLLER) } 'Expect redirect';
! isa_ok($@, 'HTTP::WebTest::Exception::Redirect',
'Verify exception class');
is($@->url, 'list', 'Test url property of exception');
--- 37,41 ----
$CONTROLLER->cgi(CGI->new({ enable => 0 }));
dies_ok { $ACTION->execute($CONTROLLER) } 'Expect redirect';
! isa_ok($@, 'HTTP::WebTest::Recorder::Exception::Redirect',
'Verify exception class');
is($@->url, 'list', 'Test url property of exception');
***************
*** 47,51 ****
$CONTROLLER->cgi(CGI->new({ enable => 1 }));
dies_ok { $ACTION->execute($CONTROLLER) } 'Expect redirect';
! isa_ok($@, 'HTTP::WebTest::Exception::Redirect',
'Verify exception class');
is($@->url, 'list', 'Test url property of exception');
--- 47,51 ----
$CONTROLLER->cgi(CGI->new({ enable => 1 }));
dies_ok { $ACTION->execute($CONTROLLER) } 'Expect redirect';
! isa_ok($@, 'HTTP::WebTest::Recorder::Exception::Redirect',
'Verify exception class');
is($@->url, 'list', 'Test url property of exception');
Index: 06-action-wtscript.t
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest-Recorder/t/06-action-wtscript.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** 06-action-wtscript.t 18 Jan 2003 18:52:18 -0000 1.2
--- 06-action-wtscript.t 25 Jan 2003 14:54:51 -0000 1.3
***************
*** 9,21 ****
use Test::More tests => 7;
! require_ok('HTTP::WebTest::Action::WTScript');
! require_ok('HTTP::WebTest::Controller');
require_ok('HTTP::WebTest::Recorder');
# test constructors
! my $ACTION = new HTTP::WebTest::Action::WTScript;
! isa_ok($ACTION, 'HTTP::WebTest::Action::WTScript');
! my $CONTROLLER = new HTTP::WebTest::Controller;
! isa_ok($CONTROLLER, 'HTTP::WebTest::Controller');
my $RECORDER = new HTTP::WebTest::Recorder;
isa_ok($RECORDER, 'HTTP::WebTest::Recorder');
--- 9,21 ----
use Test::More tests => 7;
! require_ok('HTTP::WebTest::Recorder::Action::WTScript');
! require_ok('HTTP::WebTest::Recorder::Controller');
require_ok('HTTP::WebTest::Recorder');
# test constructors
! my $ACTION = new HTTP::WebTest::Recorder::Action::WTScript;
! isa_ok($ACTION, 'HTTP::WebTest::Recorder::Action::WTScript');
! my $CONTROLLER = new HTTP::WebTest::Recorder::Controller;
! isa_ok($CONTROLLER, 'HTTP::WebTest::Recorder::Controller');
my $RECORDER = new HTTP::WebTest::Recorder;
isa_ok($RECORDER, 'HTTP::WebTest::Recorder');
Index: 05-action-request.t
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest-Recorder/t/05-action-request.t,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** 05-action-request.t 18 Jan 2003 18:52:18 -0000 1.3
--- 05-action-request.t 25 Jan 2003 14:54:51 -0000 1.4
***************
*** 9,21 ****
use Test::More tests => 9;
! require_ok('HTTP::WebTest::Action::Request');
! require_ok('HTTP::WebTest::Controller');
require_ok('HTTP::WebTest::Recorder');
# test constructors
! my $ACTION = new HTTP::WebTest::Action::Request;
! isa_ok($ACTION, 'HTTP::WebTest::Action::Request');
! my $CONTROLLER = new HTTP::WebTest::Controller;
! isa_ok($CONTROLLER, 'HTTP::WebTest::Controller');
my $RECORDER = new HTTP::WebTest::Recorder;
isa_ok($RECORDER, 'HTTP::WebTest::Recorder');
--- 9,21 ----
use Test::More tests => 9;
! require_ok('HTTP::WebTest::Recorder::Action::Request');
! require_ok('HTTP::WebTest::Recorder::Controller');
require_ok('HTTP::WebTest::Recorder');
# test constructors
! my $ACTION = new HTTP::WebTest::Recorder::Action::Request;
! isa_ok($ACTION, 'HTTP::WebTest::Recorder::Action::Request');
! my $CONTROLLER = new HTTP::WebTest::Recorder::Controller;
! isa_ok($CONTROLLER, 'HTTP::WebTest::Recorder::Controller');
my $RECORDER = new HTTP::WebTest::Recorder;
isa_ok($RECORDER, 'HTTP::WebTest::Recorder');
Index: 04-action-list.t
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest-Recorder/t/04-action-list.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** 04-action-list.t 18 Jan 2003 18:52:18 -0000 1.2
--- 04-action-list.t 25 Jan 2003 14:54:51 -0000 1.3
***************
*** 9,21 ****
use Test::More tests => 7;
! require_ok('HTTP::WebTest::Action::List');
! require_ok('HTTP::WebTest::Controller');
require_ok('HTTP::WebTest::Recorder');
# test constructors
! my $ACTION = new HTTP::WebTest::Action::List;
! isa_ok($ACTION, 'HTTP::WebTest::Action::List');
! my $CONTROLLER = new HTTP::WebTest::Controller;
! isa_ok($CONTROLLER, 'HTTP::WebTest::Controller');
my $RECORDER = new HTTP::WebTest::Recorder;
isa_ok($RECORDER, 'HTTP::WebTest::Recorder');
--- 9,21 ----
use Test::More tests => 7;
! require_ok('HTTP::WebTest::Recorder::Action::List');
! require_ok('HTTP::WebTest::Recorder::Controller');
require_ok('HTTP::WebTest::Recorder');
# test constructors
! my $ACTION = new HTTP::WebTest::Recorder::Action::List;
! isa_ok($ACTION, 'HTTP::WebTest::Recorder::Action::List');
! my $CONTROLLER = new HTTP::WebTest::Recorder::Controller;
! isa_ok($CONTROLLER, 'HTTP::WebTest::Recorder::Controller');
my $RECORDER = new HTTP::WebTest::Recorder;
isa_ok($RECORDER, 'HTTP::WebTest::Recorder');
Index: 03-action.t
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest-Recorder/t/03-action.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** 03-action.t 18 Jan 2003 18:52:19 -0000 1.2
--- 03-action.t 25 Jan 2003 14:54:51 -0000 1.3
***************
*** 11,22 ****
use lib 't';
! require_ok('HTTP::WebTest::Action');
! require_ok('HTTP::WebTest::Controller');
# test constructors
! my $ACTION = new HTTP::WebTest::Action;
! isa_ok($ACTION, 'HTTP::WebTest::Action');
! my $CONTROLLER = new HTTP::WebTest::Controller;
! isa_ok($CONTROLLER, 'HTTP::WebTest::Controller');
# test execute()
--- 11,22 ----
use lib 't';
! require_ok('HTTP::WebTest::Recorder::Action');
! require_ok('HTTP::WebTest::Recorder::Controller');
# test constructors
! my $ACTION = new HTTP::WebTest::Recorder::Action;
! isa_ok($ACTION, 'HTTP::WebTest::Recorder::Action');
! my $CONTROLLER = new HTTP::WebTest::Recorder::Controller;
! isa_ok($CONTROLLER, 'HTTP::WebTest::Recorder::Controller');
# test execute()
Index: 02-controller.t
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest-Recorder/t/02-controller.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** 02-controller.t 24 Jan 2003 09:38:07 -0000 1.2
--- 02-controller.t 25 Jan 2003 14:54:51 -0000 1.3
***************
*** 12,20 ****
use lib 't';
! require_ok('HTTP::WebTest::Controller');
# test constructor
! my $CONTROLLER = new HTTP::WebTest::Controller;
! isa_ok($CONTROLLER, 'HTTP::WebTest::Controller');
# try to get template toolkit object and process one of recorder's
--- 12,20 ----
use lib 't';
! require_ok('HTTP::WebTest::Recorder::Controller');
# test constructor
! my $CONTROLLER = new HTTP::WebTest::Recorder::Controller;
! isa_ok($CONTROLLER, 'HTTP::WebTest::Recorder::Controller');
# try to get template toolkit object and process one of recorder's
***************
*** 70,74 ****
like($response->content, qr/CGI = CGI/,
'CGI object should be passed to template');
! like($response->content, qr/CONTROLLER = HTTP::WebTest::Controller/,
'Controller object should be passed to template');
like($response->content, qr/REQUEST = HTTP::Request/,
--- 70,75 ----
like($response->content, qr/CGI = CGI/,
'CGI object should be passed to template');
! like($response->content,
! qr/CONTROLLER = HTTP::WebTest::Recorder::Controller/,
'Controller object should be passed to template');
like($response->content, qr/REQUEST = HTTP::Request/,
***************
*** 104,108 ****
{
dies_ok { $CONTROLLER->redirect('xxx') } 'Expecting redirect exception';
! isa_ok($@, 'HTTP::WebTest::Exception::Redirect',
'Verify exception class');
is($@->url, 'xxx', 'Test url property of exception');
--- 105,109 ----
{
dies_ok { $CONTROLLER->redirect('xxx') } 'Expecting redirect exception';
! isa_ok($@, 'HTTP::WebTest::Recorder::Exception::Redirect',
'Verify exception class');
is($@->url, 'xxx', 'Test url property of exception');
***************
*** 111,121 ****
# try to access page that generates a redirect
{
! local %HTTP::WebTest::Controller::DISPATCH =
( redirect => 'TestRedirect' );
# just to disable used only once warning
! () = %HTTP::WebTest::Controller::DISPATCH;
{
package TestRedirect;
! use base qw(HTTP::WebTest::Action);
sub execute {
--- 112,122 ----
# try to access page that generates a redirect
{
! local %HTTP::WebTest::Recorder::Controller::DISPATCH =
( redirect => 'TestRedirect' );
# just to disable used only once warning
! () = %HTTP::WebTest::Recorder::Controller::DISPATCH;
{
package TestRedirect;
! use base qw(HTTP::WebTest::Recorder::Action);
sub execute {
Index: 01-recorder.t
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest-Recorder/t/01-recorder.t,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** 01-recorder.t 18 Jan 2003 17:04:45 -0000 1.4
--- 01-recorder.t 25 Jan 2003 14:54:51 -0000 1.5
***************
*** 109,113 ****
# test controller of proxy's web interface
{
! isa_ok($RECORDER->controller, 'HTTP::WebTest::Controller');
my $request = GET 'http://localhost/webtest/testme';
my $response = $RECORDER->handle($request);
--- 109,113 ----
# test controller of proxy's web interface
{
! isa_ok($RECORDER->controller, 'HTTP::WebTest::Recorder::Controller');
my $request = GET 'http://localhost/webtest/testme';
my $response = $RECORDER->handle($request);
|