RT 3.8.17
[freeside.git] / rt / t / web / compilation_errors.t
index 46a8628..ab69978 100644 (file)
@@ -5,9 +5,9 @@ use Test::More;
 use File::Find;
 BEGIN {
     sub wanted {
-        -f && /\.html$/ && $_ !~ /Logout.html$/;
+        -f && /\.html$/ && $_ !~ /Logout.html$/ && $File::Find::dir !~ /RichText/;
     }
-    my $tests = 7;
+    my $tests = 4;
     find( sub { wanted() and $tests += 4 }, 'share/html/' );
     plan tests => $tests;
 }
@@ -36,15 +36,7 @@ is ($agent->{'status'}, 200, "Loaded a page");
 # {{{ test a login
 
 # follow the link marked "Login"
-
-ok($agent->{form}->find_input('user'));
-
-ok($agent->{form}->find_input('pass'));
-like ($agent->{'content'} , qr/username:/i);
-$agent->field( 'user' => 'root' );
-$agent->field( 'pass' => 'password' );
-# the field isn't named, so we have to click link 0
-$agent->click(0);
+$agent->login(root => 'password');
 is($agent->{'status'}, 200, "Fetched the page ok");
 like( $agent->{'content'} , qr/Logout/i, "Found a logout link");
 
@@ -56,7 +48,7 @@ sub test_get {
 
         $file =~ s#^share/html/##;
         diag( "testing $url/$file" ) if $ENV{TEST_VERBOSE};
-        ok ($agent->get("$url/$file", "GET $url/$file"), "Can Get $url/$file");
+        ok ($agent->get("$url/$file"), "Can Get $url/$file");
         is ($agent->{'status'}, 200, "Loaded $file");
 #        ok( $agent->{'content'} =~ /Logout/i, "Found a logout link on $file ");
         ok( $agent->{'content'} !~ /Not logged in/i, "Still logged in for  $file");