summaryrefslogtreecommitdiff
path: root/rt/lib/t/03web.pl
diff options
context:
space:
mode:
Diffstat (limited to 'rt/lib/t/03web.pl')
-rw-r--r--rt/lib/t/03web.pl34
1 files changed, 33 insertions, 1 deletions
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/');