1234567891011121314151617181920 #!/usr/bin/env perluse strict;use warnings;use Test::More tests => 5;# setup library pathuse FindBin qw($Bin);use lib "$Bin/lib";# make sure testapp worksuse ok 'TestApp';# a live test against TestApp, the test applicationuse Test::WWW::Mechanize::Catalyst 'TestApp';my $mech = Test::WWW::Mechanize::Catalyst->new;$mech->get_ok('http://localhost/', 'get main page');$mech->content_like(qr/it works/i, 'see if it has our text');$mech->get_ok('http://localhost/pdf_test/', 'pdf test');$mech->get_ok('http://localhost/pdf_another/', 'pdf test2');
#!/usr/bin/env perl
use
strict;
warnings;
Test::More
tests
=> 5;
# setup library path
FindBin
qw($Bin)
;
lib
"$Bin/lib"
# make sure testapp works
ok
'TestApp'
# a live test against TestApp, the test application
Test::WWW::Mechanize::Catalyst
my
$mech
= Test::WWW::Mechanize::Catalyst->new;
->get_ok(
'http://localhost/'
,
'get main page'
);
->content_like(
qr/it works/
i,
'see if it has our text'
'http://localhost/pdf_test/'
'pdf test'
'http://localhost/pdf_another/'
'pdf test2'