X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Ft%2Fmail%2Fdashboard-chart-with-utf8.t;h=4fe483a1b902a776d6d7f4496efb2522b140c818;hb=765aac1902113738afd1bcaee8eb25b44ee92e63;hp=6d07b963b72fd38875a9ea4f16a369390f9b8965;hpb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500;p=freeside.git diff --git a/rt/t/mail/dashboard-chart-with-utf8.t b/rt/t/mail/dashboard-chart-with-utf8.t index 6d07b963b..4fe483a1b 100644 --- a/rt/t/mail/dashboard-chart-with-utf8.t +++ b/rt/t/mail/dashboard-chart-with-utf8.t @@ -1,8 +1,10 @@ use strict; use warnings; -use RT::Test tests => 15; -use utf8; +use RT::Test tests => undef; + +plan skip_all => 'GD required' + unless GD->require; my $root = RT::Test->load_or_create_user( Name => 'root' ); @@ -11,16 +13,17 @@ ok( $m->login, 'logged in' ); my $ticket = RT::Ticket->new( $RT::SystemUser ); $ticket->Create( Queue => 'General', - Subject => 'test äöü', + Subject => Encode::decode("UTF-8",'test äöü'), ); ok( $ticket->id, 'created ticket' ); -$m->get_ok(q{/Search/Chart.html?Query=Subject LIKE 'test äöü'}); +$m->get_ok(Encode::decode("UTF-8", q{/Search/Chart.html?Query=Subject LIKE 'test äöü'})); $m->submit_form( form_name => 'SaveSearch', fields => { SavedSearchDescription => 'chart foo', SavedSearchOwner => 'RT::User-' . $root->id, + ChartStyle => 'bar', }, button => 'SavedSearchSave', ); @@ -48,7 +51,7 @@ $m->field( 'Hour' => '06:00' ); $m->click_button( name => 'Save' ); $m->content_contains('Subscribed to dashboard dashboard foo'); -my $c = $m->get(q{/Search/Chart?Query=Subject LIKE 'test äöü'}); +my $c = $m->get(Encode::decode("UTF-8",q{/Search/Chart?Query=Subject LIKE 'test äöü'})); my $image = $c->content; RT::Test->run_and_capture( command => $RT::SbinPath . '/rt-email-dashboards', all => 1 @@ -80,3 +83,5 @@ if ( my $io = $handle->open('r') ) { } is( $mail_image_data, $image, 'image in mail is the same one in web' ); +undef $m; +done_testing;