10 eval { require Test::WWW::Mechanize::Catalyst }
12 "Test::WWW::Mechanize::Catalyst is needed for this test";
18 use Test::WWW::Mechanize::Catalyst qw/AuthTestApp/;
19 my $mech = Test::WWW::Mechanize::Catalyst->new;
20 $mech->get("http://localhost/moose");
21 is( $mech->status, 401, "status is 401" ) or die $mech->content;
22 $mech->content_lacks( "foo", "no output" );
23 my $r = HTTP::Request->new( GET => "http://localhost/moose" );
24 $r->authorization_basic(qw/foo s3cr3t/);
26 is( $mech->status, 200, "status is 200" );
27 $mech->content_contains( "foo", "foo output" );