X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Flib%2Ft%2F03web.pl;h=94ad3e97eb84393cf99f053c0540d50955001492;hp=4500ff281c6901e4026fdefb7541305c672f2ca9;hb=75162bb14b3e38d66617077843f4dfdcaf09d5c4;hpb=945721f48f74d5cfffef7c7cf3a3d6bc2521f5dd diff --git a/rt/lib/t/03web.pl b/rt/lib/t/03web.pl index 4500ff281..94ad3e97e 100644 --- a/rt/lib/t/03web.pl +++ b/rt/lib/t/03web.pl @@ -5,6 +5,7 @@ use WWW::Mechanize; use HTTP::Request::Common; use HTTP::Cookies; use LWP; +use Encode; my $cookie_jar = HTTP::Cookies->new; my $agent = WWW::Mechanize->new(); @@ -15,7 +16,7 @@ $agent->cookie_jar($cookie_jar); # get the top page -my $url = "http://localhost/"; +my $url = "http://localhost".$RT::WebPath."/"; $agent->get($url); is ($agent->{'status'}, 200, "Loaded a page"); @@ -37,6 +38,37 @@ is($agent->{'status'}, 200, "Fetched the page ok"); ok( $agent->{'content'} =~ /Logout/i, "Found a logout link"); + +$agent->get($url."Ticket/Create.html?Queue=1"); +is ($agent->{'status'}, 200, "Loaded Create.html"); +$agent->form(3); +# Start with a string containing characters in latin1 +my $string = "I18N Web Testing æøå"; +Encode::from_to($string, 'iso-8859-1', 'utf8'); +$agent->field('Subject' => "Foo"); +$agent->field('Content' => $string); +ok($agent->submit(), "Created new ticket with $string"); + +ok( $agent->{'content'} =~ qr{$string} , "Found the content"); + +$agent->get($url."Ticket/Create.html?Queue=1"); +is ($agent->{'status'}, 200, "Loaded Create.html"); +$agent->form(3); +# Start with a string containing characters in latin1 +my $string = "I18N Web Testing æøå"; +Encode::from_to($string, 'iso-8859-1', 'utf8'); +$agent->field('Subject' => $string); +$agent->field('Content' => "BAR"); +ok($agent->submit(), "Created new ticket with $string"); + +ok( $agent->{'content'} =~ qr{$string} , "Found the content"); + + + +# }}} + + + use File::Find; find ( \&wanted , 'html/');