X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Ft%2Fmail%2Fdashboard-chart-with-utf8.t;h=37f8ce0c63b0e2d00ba02dd4d440bda93ee46ecc;hb=ab42a6d76c5a5905d223d214e409f0527b2c5b9e;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..37f8ce0c6 100644 --- a/rt/t/mail/dashboard-chart-with-utf8.t +++ b/rt/t/mail/dashboard-chart-with-utf8.t @@ -1,8 +1,16 @@ use strict; use warnings; -use RT::Test tests => 15; -use utf8; +BEGIN { + require RT::Test; + + if (eval { require GD }) { + RT::Test->import(tests => 15); + } + else { + RT::Test->import(skip_all => 'GD required.'); + } +} my $root = RT::Test->load_or_create_user( Name => 'root' ); @@ -11,11 +19,11 @@ 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 => { @@ -48,7 +56,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