[Rt-commit] r18230 - in rt/3.999/branches/merge_to_3.8.2: t/web

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Feb 5 01:06:36 EST 2009


Author: sunnavy
Date: Thu Feb  5 01:06:36 2009
New Revision: 18230

Modified:
   rt/3.999/branches/merge_to_3.8.2/   (props changed)
   rt/3.999/branches/merge_to_3.8.2/t/web/basic.t
   rt/3.999/branches/merge_to_3.8.2/t/web/dashboards.t

Log:
 r19598 at sunnavys-mb:  sunnavy | 2009-02-05 14:00:07 +0800
 updated tests since base_url does not contain the trailing / any more


Modified: rt/3.999/branches/merge_to_3.8.2/t/web/basic.t
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/t/web/basic.t	(original)
+++ rt/3.999/branches/merge_to_3.8.2/t/web/basic.t	Thu Feb  5 01:06:36 2009
@@ -35,7 +35,7 @@
 $agent->submit();
 is($agent->{'status'}, 200, "Fetched the page ok");
 ok( $agent->content =~ /Logout/i, "Found a logout link");
-$agent->get($url."Ticket/Create.html?queue=1");
+$agent->get($url."/Ticket/Create.html?queue=1");
 is ($agent->{'status'}, 200, "Loaded Create.html");
 $agent->form_number(3);
 # Start with a string containing characters in latin1
@@ -48,7 +48,7 @@
 like( $agent->{'content'}, qr{$string} , "Found the content");
 ok($agent->{redirected_uri}, "Did redirection");
 
-$agent->get($url."Ticket/Create.html?queue=1");
+$agent->get($url."/Ticket/Create.html?queue=1");
 is ($agent->{'status'}, 200, "Loaded Create.html");
 $agent->form_number(3);
 # Start with a string containing characters in latin1
@@ -74,7 +74,7 @@
 
 TODO: {
     todo_skip("Need to handle mason trying to compile images",1);
-$agent->get( $url."NoAuth/images/test.png" );
+$agent->get( $url."/NoAuth/images/test.png" );
 my $file = RT::Test::get_relocatable_file(
   File::Spec->catfile(
     qw(.. .. share html NoAuth images test.png)
@@ -94,7 +94,7 @@
 # XXX: hey-ho, we have these tests in t/web/query-builder
 # TODO: move everything about QB there
 
-my $response = $agent->get($url."Search/Build.html");
+my $response = $agent->get($url."/Search/Build.html");
 ok( $response->is_success, "Fetched " . $url."Search/Build.html" );
 
 # Parsing TicketSQL

Modified: rt/3.999/branches/merge_to_3.8.2/t/web/dashboards.t
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/t/web/dashboards.t	(original)
+++ rt/3.999/branches/merge_to_3.8.2/t/web/dashboards.t	Thu Feb  5 01:06:36 2009
@@ -36,12 +36,12 @@
 
 ok $m->login(customer => 'customer'), "logged in";
 
-$m->get_ok($url."Dashboards/index.html");
+$m->get_ok($url."/Dashboards/index.html");
 $m->content_lacks("New dashboard", "No 'new dashboard' link because we have no CreateOwnDashboard");
 
 $m->no_warnings_ok;
 
-$m->get_ok($url."Dashboards/Modify.html?create=1");
+$m->get_ok($url."/Dashboards/Modify.html?create=1");
 $m->content_contains("Permission denied");
 $m->content_lacks("Save Changes");
 
@@ -51,7 +51,7 @@
 );
 
 # Modify itself is no longer good enough, you need Create
-$m->get_ok($url."Dashboards/Modify.html?create=1");
+$m->get_ok($url."/Dashboards/Modify.html?create=1");
 $m->content_contains("Permission denied");
 $m->content_lacks("Save Changes");
 
@@ -59,7 +59,7 @@
 
 $user_obj->principal->grant_right(right => 'ModifyOwnDashboard', object => RT->system);
 # Modify itself is no longer good enough, you need Create
-$m->get_ok($url."Dashboards/Modify.html?Create=1");
+$m->get_ok($url."/Dashboards/Modify.html?Create=1");
 $m->content_contains("Permission denied");
 $m->content_lacks("Save Changes");
 
@@ -70,11 +70,11 @@
     object => RT->system
 );
 
-$m->get_ok($url."Dashboards/Modify.html?create=1");
+$m->get_ok($url."/Dashboards/Modify.html?create=1");
 $m->content_lacks("Permission denied");
 $m->content_contains("Save Changes");
 
-$m->get_ok($url."Dashboards/index.html");
+$m->get_ok($url."/Dashboards/index.html");
 $m->content_contains("New dashboard", "'New dashboard' link because we now have ModifyOwnDashboard");
 
 $m->follow_link_ok({text => "New dashboard"});
@@ -86,12 +86,12 @@
 $m->content_contains("Saved dashboard different dashboard");
 $m->content_lacks('Delete', "Delete button hidden because we lack DeleteOwnDashboard");
 
-$m->get_ok($url."Dashboards/index.html");
+$m->get_ok($url."/Dashboards/index.html");
 $m->content_lacks("different dashboard", "we lack SeeOwnDashboard");
 
 $user_obj->principal->grant_right(right => 'SeeOwnDashboard', object => RT->system );
 
-$m->get_ok($url."Dashboards/index.html");
+$m->get_ok($url."/Dashboards/index.html");
 $m->content_contains("different dashboard", "we now have SeeOwnDashboard");
 $m->content_lacks("Permission denied");
 
@@ -214,7 +214,7 @@
 
 # now test that we warn about searches others can't see
 # first create a personal saved search...
-$m->get_ok($url."Search/Build.html");
+$m->get_ok($url."/Search/Build.html");
 $m->follow_link_ok({text => 'Advanced'});
 $m->form_with_fields('query');
 $m->field(query => "id > 0");
@@ -225,7 +225,7 @@
 $m->click_button(name => "saved_search_save");
 
 # then the system-wide dashboard
-$m->get_ok($url."Dashboards/Modify.html?create=1");
+$m->get_ok($url."/Dashboards/Modify.html?create=1");
 
 $m->form_name('modify_dashboard');
 $m->field("name" => 'system dashboard');


More information about the Rt-commit mailing list