summaryrefslogtreecommitdiff
path: root/rt/lib/t/regression/08web_cf_access.t
diff options
context:
space:
mode:
authorivan <ivan>2008-03-02 04:06:06 +0000
committerivan <ivan>2008-03-02 04:06:06 +0000
commit9c68254528b6f2c7d8c1921b452fa56064783782 (patch)
tree09623ba39355e74f1cff2f3c35b7347bd309f306 /rt/lib/t/regression/08web_cf_access.t
parentef20b2b6b1feb47ad02b5ff7525f1a0fd11d0fa4 (diff)
import rt 3.4.6
Diffstat (limited to 'rt/lib/t/regression/08web_cf_access.t')
-rw-r--r--rt/lib/t/regression/08web_cf_access.t15
1 files changed, 7 insertions, 8 deletions
diff --git a/rt/lib/t/regression/08web_cf_access.t b/rt/lib/t/regression/08web_cf_access.t
index c352bbcf8..012d73381 100644
--- a/rt/lib/t/regression/08web_cf_access.t
+++ b/rt/lib/t/regression/08web_cf_access.t
@@ -2,14 +2,13 @@
use strict;
use Test::More tests => 15;
-BEGIN {
- use RT;
- RT::LoadConfig;
- RT::Init;
-}
+use RT;
+RT::LoadConfig;
+RT::Init;
use Test::WWW::Mechanize;
-use constant BaseURL => $RT::WebURL;
+$RT::WebURL ||= 0; # avoid stupid warning
+my $BaseURL = $RT::WebURL;
use constant ImageFile => $RT::MasonComponentRoot .'/NoAuth/images/bplogo.gif';
use constant ImageFileContent => do {
local $/;
@@ -21,7 +20,7 @@ use constant ImageFileContent => do {
my $m = Test::WWW::Mechanize->new;
isa_ok($m, 'Test::WWW::Mechanize');
-$m->get( BaseURL."?user=root;pass=password" );
+$m->get( $BaseURL."?user=root;pass=password" );
$m->content_like(qr/Logout/, 'we did log in');
$m->follow_link( text => 'Configuration' );
$m->title_is(q/RT Administration/, 'admin screen');
@@ -86,7 +85,7 @@ $m->title_like(qr/testing img cf creation/, "its title is the Subject");
$m->follow_link( text => 'bplogo.gif' );
$m->content_is(ImageFileContent, "it links to the uploaded image");
-$m->get( BaseURL );
+$m->get( $BaseURL );
$m->follow_link( text => 'Tickets' );
$m->follow_link( text => 'New Query' );