[Rt-commit] r4752 - in rt/branches/3.5-TESTING: lib/t/regression
kevinr at bestpractical.com
kevinr at bestpractical.com
Mon Mar 13 21:47:53 EST 2006
Author: kevinr
Date: Mon Mar 13 21:47:52 2006
New Revision: 4752
Modified:
rt/branches/3.5-TESTING/ (props changed)
rt/branches/3.5-TESTING/lib/t/regression/02basic_web.t
rt/branches/3.5-TESTING/lib/t/regression/03web_compiliation_errors.t
rt/branches/3.5-TESTING/lib/t/regression/06mailgateway.t
rt/branches/3.5-TESTING/lib/t/regression/07acl.t
rt/branches/3.5-TESTING/lib/t/regression/08web_cf_access.t
rt/branches/3.5-TESTING/lib/t/regression/17custom_search.t
rt/branches/3.5-TESTING/lib/t/regression/18custom_frontpage.t
Log:
r11458 at SAD-GIRL-IN-SNOW: kevinr | 2006-03-13 19:28:36 -0500
* Applied patch from Todd Chapman to make the RT 3.5 test-suite obey the
configuration directives for server and port, so you don't have to be
testing on localhost and port 80.
Modified: rt/branches/3.5-TESTING/lib/t/regression/02basic_web.t
==============================================================================
--- rt/branches/3.5-TESTING/lib/t/regression/02basic_web.t (original)
+++ rt/branches/3.5-TESTING/lib/t/regression/02basic_web.t Mon Mar 13 21:47:52 2006
@@ -18,7 +18,7 @@
use RT;
RT::LoadConfig();
# get the top page
-my $url = "http://localhost:".$RT::WebPort.$RT::WebPath."/";
+my $url = $RT::WebURL;
diag $url;
$agent->get($url);
Modified: rt/branches/3.5-TESTING/lib/t/regression/03web_compiliation_errors.t
==============================================================================
--- rt/branches/3.5-TESTING/lib/t/regression/03web_compiliation_errors.t (original)
+++ rt/branches/3.5-TESTING/lib/t/regression/03web_compiliation_errors.t Mon Mar 13 21:47:52 2006
@@ -18,7 +18,7 @@
RT::LoadConfig();
# get the top page
-my $url = "http://localhost:".$RT::WebPort.$RT::WebPath."/";
+my $url = $RT::WebURL;
diag "Base URL is '$url'" if $ENV{TEST_VERBOSE};
$agent->get($url);
Modified: rt/branches/3.5-TESTING/lib/t/regression/06mailgateway.t
==============================================================================
--- rt/branches/3.5-TESTING/lib/t/regression/06mailgateway.t (original)
+++ rt/branches/3.5-TESTING/lib/t/regression/06mailgateway.t Mon Mar 13 21:47:52 2006
@@ -58,7 +58,7 @@
RT::Init();
use RT::I18N;
no warnings 'once';
-my $url = "http://localhost:".$RT::WebPort.$RT::WebPath."/";
+my $url = $RT::WebURL;
# Make sure that when we call the mailgate wrong, it tempfails
Modified: rt/branches/3.5-TESTING/lib/t/regression/07acl.t
==============================================================================
--- rt/branches/3.5-TESTING/lib/t/regression/07acl.t (original)
+++ rt/branches/3.5-TESTING/lib/t/regression/07acl.t Mon Mar 13 21:47:52 2006
@@ -33,9 +33,9 @@
login($agent, $user_obj);
# Test for absence of Configure and Preferences tabs.
-ok(!$agent->find_link( url => "$RT::WebPath/Admin/",
+ok(!$agent->find_link( url => $RT::WebPath . "/Admin/",
text => 'Configuration'), "No config tab" );
-ok(!$agent->find_link( url => "$RT::WebPath/User/Prefs.html",
+ok(!$agent->find_link( url => $RT::WebPath . "/User/Prefs.html",
text => 'Preferences'), "No prefs pane" );
# Now test for their presence, one at a time. Sleep for a bit after
@@ -47,7 +47,7 @@
$agent->reload;
ok($agent->{'content'} =~ /Logout/i, "Reloaded page successfully");
-ok($agent->find_link( url => "$RT::WebPath/Admin/",
+ok($agent->find_link( url => $RT::WebPath . "/Admin/",
text => 'Configuration'), "Found config tab" );
my ($revokeid,$revokemsg) =$user_obj->PrincipalObj->RevokeRight(Right => 'ShowConfigTab');
ok ($revokeid,$revokemsg);
@@ -55,12 +55,12 @@
ok ($grantid,$grantmsg);
$agent->reload();
ok($agent->{'content'} =~ /Logout/i, "Reloaded page successfully");
-ok($agent->find_link( url => "$RT::WebPath/User/Prefs.html",
+ok($agent->find_link( url => $RT::WebPath . "/User/Prefs.html",
text => 'Preferences'), "Found prefs pane" );
($revokeid,$revokemsg) = $user_obj->PrincipalObj->RevokeRight(Right => 'ModifySelf');
ok ($revokeid,$revokemsg);
# Good. Now load the search page and test Load/Save Search.
-$agent->follow_link( url => "$RT::WebPath/Search/Build.html",
+$agent->follow_link( url => $RT::WebPath . "/Search/Build.html",
text => 'Tickets');
is($agent->{'status'}, 200, "Fetched search builder page");
ok($agent->{'content'} !~ /Load saved search/i, "No search loading box");
@@ -114,10 +114,10 @@
sub login {
my $agent = shift;
- my $url = "http://localhost:" . $RT::WebPort . $RT::WebPath . "/";
+ my $url = $RT::WebURL;
$agent->get($url);
is( $agent->{'status'}, 200,
- "Loaded a page - http://localhost" . $RT::WebPath );
+ "Loaded a page - $url" );
# {{{ test a login
Modified: rt/branches/3.5-TESTING/lib/t/regression/08web_cf_access.t
==============================================================================
--- rt/branches/3.5-TESTING/lib/t/regression/08web_cf_access.t (original)
+++ rt/branches/3.5-TESTING/lib/t/regression/08web_cf_access.t Mon Mar 13 21:47:52 2006
@@ -9,8 +9,7 @@
}
use Test::WWW::Mechanize;
-$RT::WebPath ||= ''; # Shut up a warning
-use constant BaseURL => "http://localhost:".$RT::WebPort.$RT::WebPath."/";
+use constant BaseURL => $RT::WebURL;
use constant ImageFile => $RT::MasonComponentRoot .'/NoAuth/images/bplogo.gif';
use constant ImageFileContent => do {
local $/;
Modified: rt/branches/3.5-TESTING/lib/t/regression/17custom_search.t
==============================================================================
--- rt/branches/3.5-TESTING/lib/t/regression/17custom_search.t (original)
+++ rt/branches/3.5-TESTING/lib/t/regression/17custom_search.t Mon Mar 13 21:47:52 2006
@@ -9,8 +9,7 @@
}
use Test::WWW::Mechanize;
-$RT::WebPath ||= ''; # Shut up a warning
-use constant BaseURL => "http://localhost:".$RT::WebPort.$RT::WebPath."/";
+use constant BaseURL => $RT::WebURL;
# reset preferences for easier test?
Modified: rt/branches/3.5-TESTING/lib/t/regression/18custom_frontpage.t
==============================================================================
--- rt/branches/3.5-TESTING/lib/t/regression/18custom_frontpage.t (original)
+++ rt/branches/3.5-TESTING/lib/t/regression/18custom_frontpage.t Mon Mar 13 21:47:52 2006
@@ -9,8 +9,7 @@
}
use Test::WWW::Mechanize;
-$RT::WebPath ||= ''; # Shut up a warning
-use constant BaseURL => "http://localhost:".$RT::WebPort.$RT::WebPath."/";
+use constant BaseURL => $RT::WebURL;
my $user_obj = RT::User->new($RT::SystemUser);
More information about the Rt-commit
mailing list