X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Flib%2Ft%2Fregression%2F08web_cf_access.t;h=c352bbcf8a18c42592e64998186114eeb413cbfe;hp=012d733816954113f7be2dbadcab9ae8c4d454e1;hb=ef20b2b6b1feb47ad02b5ff7525f1a0fd11d0fa4;hpb=a513c0bef534d05f03c1242831b6f3be19b97dae diff --git a/rt/lib/t/regression/08web_cf_access.t b/rt/lib/t/regression/08web_cf_access.t index 012d73381..c352bbcf8 100644 --- a/rt/lib/t/regression/08web_cf_access.t +++ b/rt/lib/t/regression/08web_cf_access.t @@ -2,13 +2,14 @@ use strict; use Test::More tests => 15; -use RT; -RT::LoadConfig; -RT::Init; +BEGIN { + use RT; + RT::LoadConfig; + RT::Init; +} use Test::WWW::Mechanize; -$RT::WebURL ||= 0; # avoid stupid warning -my $BaseURL = $RT::WebURL; +use constant BaseURL => $RT::WebURL; use constant ImageFile => $RT::MasonComponentRoot .'/NoAuth/images/bplogo.gif'; use constant ImageFileContent => do { local $/; @@ -20,7 +21,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'); @@ -85,7 +86,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' );