8 -f && /\.html$/ && $_ !~ /Logout.html$/;
11 find( sub { wanted() and $tests += 4 }, 'share/html/' );
16 use HTTP::Request::Common;
21 my $cookie_jar = HTTP::Cookies->new;
24 my ($baseurl, $agent) = RT::Test->started_ok;
26 # give the agent a place to stash the cookies
27 $agent->cookie_jar($cookie_jar);
30 my $url = $agent->rt_base_url;
31 diag "Base URL is '$url'" if $ENV{TEST_VERBOSE};
34 is ($agent->{'status'}, 200, "Loaded a page");
38 # follow the link marked "Login"
40 ok($agent->{form}->find_input('user'));
42 ok($agent->{form}->find_input('pass'));
43 like ($agent->{'content'} , qr/username:/i);
44 $agent->field( 'user' => 'root' );
45 $agent->field( 'pass' => 'password' );
46 # the field isn't named, so we have to click link 0
48 is($agent->{'status'}, 200, "Fetched the page ok");
49 like( $agent->{'content'} , qr/Logout/i, "Found a logout link");
52 find ( sub { wanted() and test_get($File::Find::name) } , 'share/html/');
57 $file =~ s#^share/html/##;
58 diag( "testing $url/$file" ) if $ENV{TEST_VERBOSE};
59 ok ($agent->get("$url/$file", "GET $url/$file"), "Can Get $url/$file");
60 is ($agent->{'status'}, 200, "Loaded $file");
61 # ok( $agent->{'content'} =~ /Logout/i, "Found a logout link on $file ");
62 ok( $agent->{'content'} !~ /Not logged in/i, "Still logged in for $file");
63 ok( $agent->{'content'} !~ /raw error/i, "Didn't get a Mason compilation error on $file");