diff options
Diffstat (limited to 'rt/t')
| -rw-r--r-- | rt/t/web/attachments.t | 12 | ||||
| -rw-r--r-- | rt/t/web/redirect-after-login.t | 6 |
2 files changed, 15 insertions, 3 deletions
diff --git a/rt/t/web/attachments.t b/rt/t/web/attachments.t index e827b2f02..87b32a7d5 100644 --- a/rt/t/web/attachments.t +++ b/rt/t/web/attachments.t @@ -1,7 +1,8 @@ #!/usr/bin/perl -w use strict; -use RT::Test tests => 14; +use RT::Test tests => 17; +$RT::Test::SKIP_REQUEST_WORK_AROUND = 1; use constant LogoFile => $RT::MasonComponentRoot .'/NoAuth/images/bplogo.gif'; use constant FaviconFile => $RT::MasonComponentRoot .'/NoAuth/images/favicon.png'; @@ -30,6 +31,15 @@ $m->content_like(qr/Attachments test/, 'we have subject on the page'); $m->content_like(qr/Some content/, 'and content'); $m->content_like(qr/Download bplogo\.gif/, 'page has file name'); +open LOGO, "<", LogoFile or die "Can't open logo file: $!"; +binmode LOGO; +my $logo_contents = do {local $/; <LOGO>}; +close LOGO; +$m->follow_link_ok({text => "Download bplogo.gif"}); +is($m->content_type, "image/gif"); +is($m->content, $logo_contents, "Binary content matches"); + +$m->back; $m->follow_link_ok({text => 'Reply'}, "reply to the ticket"); $m->form_name('TicketUpdate'); $m->field('Attach', LogoFile); diff --git a/rt/t/web/redirect-after-login.t b/rt/t/web/redirect-after-login.t index d39bb58c8..f97f1267d 100644 --- a/rt/t/web/redirect-after-login.t +++ b/rt/t/web/redirect-after-login.t @@ -205,16 +205,17 @@ for my $path (qw(Prefs/Other.html /Prefs/Other.html)) { # test REST login response { + $agent = RT::Test::Web->new; my $requested = $url."REST/1.0/?user=root;pass=password"; $agent->get($requested); is($agent->status, 200, "Loaded a page"); is($agent->uri, $requested, "didn't redirect to /NoAuth/Login.html for REST"); - $agent->get_ok($url); - $agent->logout(); + $agent->get_ok($url."REST/1.0"); } # test REST login response for wrong pass { + $agent = RT::Test::Web->new; my $requested = $url."REST/1.0/?user=root;pass=passwrong"; $agent->get_ok($requested); is($agent->status, 200, "Loaded a page"); @@ -229,6 +230,7 @@ for my $path (qw(Prefs/Other.html /Prefs/Other.html)) { # test REST login response for no creds { + $agent = RT::Test::Web->new; my $requested = $url."REST/1.0/"; $agent->get_ok($requested); is($agent->status, 200, "Loaded a page"); |
