[Rt-commit] r10725 - rt/branches/3.999-DANGEROUS/t/web

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Feb 5 10:25:38 EST 2008


Author: sunnavy
Date: Tue Feb  5 10:25:33 2008
New Revision: 10725

Modified:
   rt/branches/3.999-DANGEROUS/t/web/command_line.t

Log:
a bit hack for the check of attachment in REST

Modified: rt/branches/3.999-DANGEROUS/t/web/command_line.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/web/command_line.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/web/command_line.t	Tue Feb  5 10:25:33 2008
@@ -7,6 +7,7 @@
 my ($baseurl, $m) = RT::Test->started_ok;
 use RT::Model::User;
 use RT::Model::Queue;
+use Encode;
 my $rt_tool_path = "$RT::BinPath/rt";
 
 # {{{  test configuration options
@@ -435,7 +436,9 @@
     open (my $fh, $attachment_path) or die "Can't open $attachment_path: $!";
     my $attachment_content = do { local($/); <$fh> };
     close $fh;
-    chomp $attachment_content;
+    $attachment_content =~ s/^\n*//;
+    $attachment_content =~ s/\n*$//;
+    $attachment_content = encode( 'utf8', $attachment_content ); # jifty output is utf8 encoded
     expect_is($attachment_content,"Attachment contains original text");
 }
 


More information about the Rt-commit mailing list