$agent->get($url."Ticket/Create.html?Queue=1");
is ($agent->{'status'}, 200, "Loaded Create.html");
$agent->get($url."Ticket/Create.html?Queue=1");
is ($agent->{'status'}, 200, "Loaded Create.html");
# Start with a string containing characters in latin1
my $string = "I18N Web Testing æøå";
Encode::from_to($string, 'iso-8859-1', 'utf8');
$agent->field('Subject' => "Ticket with utf8 body");
$agent->field('Content' => $string);
ok($agent->submit(), "Created new ticket with $string as Content");
# Start with a string containing characters in latin1
my $string = "I18N Web Testing æøå";
Encode::from_to($string, 'iso-8859-1', 'utf8');
$agent->field('Subject' => "Ticket with utf8 body");
$agent->field('Content' => $string);
ok($agent->submit(), "Created new ticket with $string as Content");
-ok( $agent->{'content'} =~ qr{$string} , "Found the content");
+like( $agent->{'content'}, qr{$string} , "Found the content");
+ok($agent->{redirected_uri}, "Did redirection");
+
+
$agent->get($url."Ticket/Create.html?Queue=1");
is ($agent->{'status'}, 200, "Loaded Create.html");
$agent->get($url."Ticket/Create.html?Queue=1");
is ($agent->{'status'}, 200, "Loaded Create.html");
# Start with a string containing characters in latin1
my $string = "I18N Web Testing æøå";
Encode::from_to($string, 'iso-8859-1', 'utf8');
# Start with a string containing characters in latin1
my $string = "I18N Web Testing æøå";
Encode::from_to($string, 'iso-8859-1', 'utf8');
$agent->field('Content' => "Ticket with utf8 subject");
ok($agent->submit(), "Created new ticket with $string as Subject");
$agent->field('Content' => "Ticket with utf8 subject");
ok($agent->submit(), "Created new ticket with $string as Subject");
+# Update time worked in hours
+$agent->follow_link( text_regex => qr/Basics/ );
+$agent->submit_form( form_number => 3,
+ fields => { TimeWorked => 5, 'TimeWorked-TimeUnits' => "hours" }
+);
$agent->field("AttachmentField", "Subject");
$agent->field("AttachmentOp", "LIKE");
$agent->field("ValueOfAttachment", "aaa");
$agent->field("AttachmentField", "Subject");
$agent->field("AttachmentOp", "LIKE");
$agent->field("ValueOfAttachment", "aaa");
# set the next value
ok($agent->form_name('BuildQuery'));
$agent->field("AttachmentField", "Subject");
$agent->field("AttachmentOp", "LIKE");
$agent->field("ValueOfAttachment", "bbb");
# set the next value
ok($agent->form_name('BuildQuery'));
$agent->field("AttachmentField", "Subject");
$agent->field("AttachmentOp", "LIKE");
$agent->field("ValueOfAttachment", "bbb");