From 2fab7bd9b1f16d8e8c352dfe0c13d80ff896ea76 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 14 Nov 2010 16:45:32 +0000 Subject: Adds leading slash to all assert_redirected_to arguments (#6887). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4407 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/roles_controller_test.rb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'test/functional/roles_controller_test.rb') diff --git a/test/functional/roles_controller_test.rb b/test/functional/roles_controller_test.rb index 9159742c9..1e0e3ea64 100644 --- a/test/functional/roles_controller_test.rb +++ b/test/functional/roles_controller_test.rb @@ -65,7 +65,7 @@ class RolesControllerTest < ActionController::TestCase :permissions => ['add_issues', 'edit_issues', 'log_time', ''], :assignable => '0'} - assert_redirected_to 'roles' + assert_redirected_to '/roles' role = Role.find_by_name('RoleWithoutWorkflowCopy') assert_not_nil role assert_equal [:add_issues, :edit_issues, :log_time], role.permissions @@ -78,7 +78,7 @@ class RolesControllerTest < ActionController::TestCase :assignable => '0'}, :copy_workflow_from => '1' - assert_redirected_to 'roles' + assert_redirected_to '/roles' role = Role.find_by_name('RoleWithWorkflowCopy') assert_not_nil role assert_equal Role.find(1).workflows.size, role.workflows.size @@ -97,7 +97,7 @@ class RolesControllerTest < ActionController::TestCase :permissions => ['edit_project', ''], :assignable => '0'} - assert_redirected_to 'roles' + assert_redirected_to '/roles' role = Role.find(1) assert_equal [:edit_project], role.permissions end @@ -107,13 +107,13 @@ class RolesControllerTest < ActionController::TestCase assert r.save post :destroy, :id => r - assert_redirected_to 'roles' + assert_redirected_to '/roles' assert_nil Role.find_by_id(r.id) end def test_destroy_role_in_use post :destroy, :id => 1 - assert_redirected_to 'roles' + assert_redirected_to '/roles' assert flash[:error] == 'This role is in use and can not be deleted.' assert_not_nil Role.find_by_id(1) end @@ -139,7 +139,7 @@ class RolesControllerTest < ActionController::TestCase def test_post_report post :report, :permissions => { '0' => '', '1' => ['edit_issues'], '3' => ['add_issues', 'delete_issues']} - assert_redirected_to 'roles' + assert_redirected_to '/roles' assert_equal [:edit_issues], Role.find(1).permissions assert_equal [:add_issues, :delete_issues], Role.find(3).permissions @@ -148,33 +148,33 @@ class RolesControllerTest < ActionController::TestCase def test_clear_all_permissions post :report, :permissions => { '0' => '' } - assert_redirected_to 'roles' + assert_redirected_to '/roles' assert Role.find(1).permissions.empty? end def test_move_highest post :edit, :id => 3, :role => {:move_to => 'highest'} - assert_redirected_to 'roles' + assert_redirected_to '/roles' assert_equal 1, Role.find(3).position end def test_move_higher position = Role.find(3).position post :edit, :id => 3, :role => {:move_to => 'higher'} - assert_redirected_to 'roles' + assert_redirected_to '/roles' assert_equal position - 1, Role.find(3).position end def test_move_lower position = Role.find(2).position post :edit, :id => 2, :role => {:move_to => 'lower'} - assert_redirected_to 'roles' + assert_redirected_to '/roles' assert_equal position + 1, Role.find(2).position end def test_move_lowest post :edit, :id => 2, :role => {:move_to => 'lowest'} - assert_redirected_to 'roles' + assert_redirected_to '/roles' assert_equal Role.count, Role.find(2).position end end -- cgit v1.2.3