@@ -64,7 +64,7 class AccountControllerTest < ActionController::TestCase | |||
|
64 | 64 | assert existing_user.save! |
|
65 | 65 | |
|
66 | 66 | post :login, :openid_url => existing_user.identity_url |
|
67 | assert_redirected_to 'my/page' | |
|
67 | assert_redirected_to '/my/page' | |
|
68 | 68 | end |
|
69 | 69 | |
|
70 | 70 | def test_login_with_invalid_openid_provider |
@@ -86,14 +86,14 class AccountControllerTest < ActionController::TestCase | |||
|
86 | 86 | assert existing_user.save! |
|
87 | 87 | |
|
88 | 88 | post :login, :openid_url => existing_user.identity_url |
|
89 | assert_redirected_to 'login' | |
|
89 | assert_redirected_to '/login' | |
|
90 | 90 | end |
|
91 | 91 | |
|
92 | 92 | def test_login_with_openid_with_new_user_created |
|
93 | 93 | Setting.self_registration = '3' |
|
94 | 94 | Setting.openid = '1' |
|
95 | 95 | post :login, :openid_url => 'http://openid.example.com/good_user' |
|
96 | assert_redirected_to 'my/account' | |
|
96 | assert_redirected_to '/my/account' | |
|
97 | 97 | user = User.find_by_login('cool_user') |
|
98 | 98 | assert user |
|
99 | 99 | assert_equal 'Cool', user.firstname |
@@ -113,7 +113,7 class AccountControllerTest < ActionController::TestCase | |||
|
113 | 113 | Setting.self_registration = '1' |
|
114 | 114 | Setting.openid = '1' |
|
115 | 115 | post :login, :openid_url => 'http://openid.example.com/good_user' |
|
116 | assert_redirected_to 'login' | |
|
116 | assert_redirected_to '/login' | |
|
117 | 117 | user = User.find_by_login('cool_user') |
|
118 | 118 | assert user |
|
119 | 119 | |
@@ -125,7 +125,7 class AccountControllerTest < ActionController::TestCase | |||
|
125 | 125 | Setting.self_registration = '2' |
|
126 | 126 | Setting.openid = '1' |
|
127 | 127 | post :login, :openid_url => 'http://openid.example.com/good_user' |
|
128 | assert_redirected_to 'login' | |
|
128 | assert_redirected_to '/login' | |
|
129 | 129 | user = User.find_by_login('cool_user') |
|
130 | 130 | assert user |
|
131 | 131 | assert_equal User::STATUS_REGISTERED, user.status |
@@ -157,7 +157,7 class AccountControllerTest < ActionController::TestCase | |||
|
157 | 157 | def test_logout |
|
158 | 158 | @request.session[:user_id] = 2 |
|
159 | 159 | get :logout |
|
160 | assert_redirected_to '' | |
|
160 | assert_redirected_to '/' | |
|
161 | 161 | assert_nil @request.session[:user_id] |
|
162 | 162 | end |
|
163 | 163 |
@@ -95,7 +95,7 class AttachmentsControllerTest < ActionController::TestCase | |||
|
95 | 95 | post :destroy, :id => 1 |
|
96 | 96 | end |
|
97 | 97 | # no referrer |
|
98 | assert_redirected_to 'projects/ecookbook' | |
|
98 | assert_redirected_to '/projects/ecookbook' | |
|
99 | 99 | assert_nil Attachment.find_by_id(1) |
|
100 | 100 | j = issue.journals.find(:first, :order => 'created_on DESC') |
|
101 | 101 | assert_equal 'attachment', j.details.first.property |
@@ -27,7 +27,7 class CommentsControllerTest < ActionController::TestCase | |||
|
27 | 27 | def test_add_comment |
|
28 | 28 | @request.session[:user_id] = 2 |
|
29 | 29 | post :create, :id => 1, :comment => { :comments => 'This is a test comment' } |
|
30 | assert_redirected_to 'news/1' | |
|
30 | assert_redirected_to '/news/1' | |
|
31 | 31 | |
|
32 | 32 | comment = News.find(1).comments.find(:first, :order => 'created_on DESC') |
|
33 | 33 | assert_not_nil comment |
@@ -40,7 +40,7 class CommentsControllerTest < ActionController::TestCase | |||
|
40 | 40 | assert_no_difference 'Comment.count' do |
|
41 | 41 | post :create, :id => 1, :comment => { :comments => '' } |
|
42 | 42 | assert_response :redirect |
|
43 | assert_redirected_to 'news/1' | |
|
43 | assert_redirected_to '/news/1' | |
|
44 | 44 | end |
|
45 | 45 | end |
|
46 | 46 | |
@@ -48,7 +48,7 class CommentsControllerTest < ActionController::TestCase | |||
|
48 | 48 | comments_count = News.find(1).comments.size |
|
49 | 49 | @request.session[:user_id] = 2 |
|
50 | 50 | delete :destroy, :id => 1, :comment_id => 2 |
|
51 | assert_redirected_to 'news/1' | |
|
51 | assert_redirected_to '/news/1' | |
|
52 | 52 | assert_nil Comment.find_by_id(2) |
|
53 | 53 | assert_equal comments_count - 1, News.find(1).comments.size |
|
54 | 54 | end |
@@ -77,7 +77,7 LOREM | |||
|
77 | 77 | :category_id => 2}, |
|
78 | 78 | :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain')}} |
|
79 | 79 | |
|
80 | assert_redirected_to 'projects/ecookbook/documents' | |
|
80 | assert_redirected_to '/projects/ecookbook/documents' | |
|
81 | 81 | |
|
82 | 82 | document = Document.find_by_title('DocumentsControllerTest#test_post_new') |
|
83 | 83 | assert_not_nil document |
@@ -90,7 +90,7 LOREM | |||
|
90 | 90 | def test_destroy |
|
91 | 91 | @request.session[:user_id] = 2 |
|
92 | 92 | post :destroy, :id => 1 |
|
93 | assert_redirected_to 'projects/ecookbook/documents' | |
|
93 | assert_redirected_to '/projects/ecookbook/documents' | |
|
94 | 94 | assert_nil Document.find_by_id(1) |
|
95 | 95 | end |
|
96 | 96 | end |
@@ -37,7 +37,7 class FilesControllerTest < ActionController::TestCase | |||
|
37 | 37 | :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain')}} |
|
38 | 38 | assert_response :redirect |
|
39 | 39 | end |
|
40 | assert_redirected_to 'projects/ecookbook/files' | |
|
40 | assert_redirected_to '/projects/ecookbook/files' | |
|
41 | 41 | a = Attachment.find(:first, :order => 'created_on DESC') |
|
42 | 42 | assert_equal 'testfile.txt', a.filename |
|
43 | 43 | assert_equal Project.find(1), a.container |
@@ -58,7 +58,7 class FilesControllerTest < ActionController::TestCase | |||
|
58 | 58 | :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain')}} |
|
59 | 59 | assert_response :redirect |
|
60 | 60 | end |
|
61 | assert_redirected_to 'projects/ecookbook/files' | |
|
61 | assert_redirected_to '/projects/ecookbook/files' | |
|
62 | 62 | a = Attachment.find(:first, :order => 'created_on DESC') |
|
63 | 63 | assert_equal 'testfile.txt', a.filename |
|
64 | 64 | assert_equal Version.find(2), a.container |
@@ -54,7 +54,7 class GroupsControllerTest < ActionController::TestCase | |||
|
54 | 54 | assert_difference 'Group.count' do |
|
55 | 55 | post :create, :group => {:lastname => 'New group'} |
|
56 | 56 | end |
|
57 | assert_redirected_to 'groups' | |
|
57 | assert_redirected_to '/groups' | |
|
58 | 58 | end |
|
59 | 59 | |
|
60 | 60 | def test_edit |
@@ -65,14 +65,14 class GroupsControllerTest < ActionController::TestCase | |||
|
65 | 65 | |
|
66 | 66 | def test_update |
|
67 | 67 | post :update, :id => 10 |
|
68 | assert_redirected_to 'groups' | |
|
68 | assert_redirected_to '/groups' | |
|
69 | 69 | end |
|
70 | 70 | |
|
71 | 71 | def test_destroy |
|
72 | 72 | assert_difference 'Group.count', -1 do |
|
73 | 73 | post :destroy, :id => 10 |
|
74 | 74 | end |
|
75 | assert_redirected_to 'groups' | |
|
75 | assert_redirected_to '/groups' | |
|
76 | 76 | end |
|
77 | 77 | |
|
78 | 78 | def test_add_users |
@@ -72,7 +72,7 class IssueMovesControllerTest < ActionController::TestCase | |||
|
72 | 72 | post :create, :ids => [1, 2], :new_project_id => 2, :copy_options => {:copy => '1'} |
|
73 | 73 | end |
|
74 | 74 | end |
|
75 | assert_redirected_to 'projects/ecookbook/issues' | |
|
75 | assert_redirected_to '/projects/ecookbook/issues' | |
|
76 | 76 | end |
|
77 | 77 | |
|
78 | 78 | context "#create via bulk copy" do |
@@ -87,7 +87,7 class MessagesControllerTest < ActionController::TestCase | |||
|
87 | 87 | :content => 'Message body'} |
|
88 | 88 | message = Message.find_by_subject('Test created message') |
|
89 | 89 | assert_not_nil message |
|
90 | assert_redirected_to "boards/1/topics/#{message.to_param}" | |
|
90 | assert_redirected_to "/boards/1/topics/#{message.to_param}" | |
|
91 | 91 | assert_equal 'Message body', message.content |
|
92 | 92 | assert_equal 2, message.author_id |
|
93 | 93 | assert_equal 1, message.board_id |
@@ -114,7 +114,7 class MessagesControllerTest < ActionController::TestCase | |||
|
114 | 114 | post :edit, :board_id => 1, :id => 1, |
|
115 | 115 | :message => { :subject => 'New subject', |
|
116 | 116 | :content => 'New body'} |
|
117 | assert_redirected_to 'boards/1/topics/1' | |
|
117 | assert_redirected_to '/boards/1/topics/1' | |
|
118 | 118 | message = Message.find(1) |
|
119 | 119 | assert_equal 'New subject', message.subject |
|
120 | 120 | assert_equal 'New body', message.content |
@@ -124,14 +124,14 class MessagesControllerTest < ActionController::TestCase | |||
|
124 | 124 | @request.session[:user_id] = 2 |
|
125 | 125 | post :reply, :board_id => 1, :id => 1, :reply => { :content => 'This is a test reply', :subject => 'Test reply' } |
|
126 | 126 | reply = Message.find(:first, :order => 'id DESC') |
|
127 | assert_redirected_to "boards/1/topics/1?r=#{reply.id}" | |
|
127 | assert_redirected_to "/boards/1/topics/1?r=#{reply.id}" | |
|
128 | 128 | assert Message.find_by_subject('Test reply') |
|
129 | 129 | end |
|
130 | 130 | |
|
131 | 131 | def test_destroy_topic |
|
132 | 132 | @request.session[:user_id] = 2 |
|
133 | 133 | post :destroy, :board_id => 1, :id => 1 |
|
134 | assert_redirected_to 'projects/ecookbook/boards/1' | |
|
134 | assert_redirected_to '/projects/ecookbook/boards/1' | |
|
135 | 135 | assert_nil Message.find_by_id(1) |
|
136 | 136 | end |
|
137 | 137 |
@@ -68,7 +68,7 class MyControllerTest < ActionController::TestCase | |||
|
68 | 68 | :login => "root", |
|
69 | 69 | :admin => 1, |
|
70 | 70 | :custom_field_values => {"4" => "0100562500"}} |
|
71 | assert_redirected_to 'my/account' | |
|
71 | assert_redirected_to '/my/account' | |
|
72 | 72 | user = User.find(2) |
|
73 | 73 | assert_equal user, assigns(:user) |
|
74 | 74 | assert_equal "Joe", user.firstname |
@@ -102,7 +102,7 class MyControllerTest < ActionController::TestCase | |||
|
102 | 102 | post :password, :password => 'jsmith', |
|
103 | 103 | :new_password => 'hello', |
|
104 | 104 | :new_password_confirmation => 'hello' |
|
105 | assert_redirected_to 'my/account' | |
|
105 | assert_redirected_to '/my/account' | |
|
106 | 106 | assert User.try_to_login('jsmith', 'hello') |
|
107 | 107 | end |
|
108 | 108 |
@@ -73,7 +73,7 class NewsControllerTest < ActionController::TestCase | |||
|
73 | 73 | post :create, :project_id => 1, :news => { :title => 'NewsControllerTest', |
|
74 | 74 | :description => 'This is the description', |
|
75 | 75 | :summary => '' } |
|
76 | assert_redirected_to 'projects/ecookbook/news' | |
|
76 | assert_redirected_to '/projects/ecookbook/news' | |
|
77 | 77 | |
|
78 | 78 | news = News.find_by_title('NewsControllerTest') |
|
79 | 79 | assert_not_nil news |
@@ -93,7 +93,7 class NewsControllerTest < ActionController::TestCase | |||
|
93 | 93 | def test_put_update |
|
94 | 94 | @request.session[:user_id] = 2 |
|
95 | 95 | put :update, :id => 1, :news => { :description => 'Description changed by test_post_edit' } |
|
96 | assert_redirected_to 'news/1' | |
|
96 | assert_redirected_to '/news/1' | |
|
97 | 97 | news = News.find(1) |
|
98 | 98 | assert_equal 'Description changed by test_post_edit', news.description |
|
99 | 99 | end |
@@ -114,7 +114,7 class NewsControllerTest < ActionController::TestCase | |||
|
114 | 114 | def test_destroy |
|
115 | 115 | @request.session[:user_id] = 2 |
|
116 | 116 | delete :destroy, :id => 1 |
|
117 | assert_redirected_to 'projects/ecookbook/news' | |
|
117 | assert_redirected_to '/projects/ecookbook/news' | |
|
118 | 118 | assert_nil News.find_by_id(1) |
|
119 | 119 | end |
|
120 | 120 | end |
@@ -20,7 +20,7 class ProjectEnumerationsControllerTest < ActionController::TestCase | |||
|
20 | 20 | } |
|
21 | 21 | |
|
22 | 22 | assert_response :redirect |
|
23 | assert_redirected_to 'projects/ecookbook/settings/activities' | |
|
23 | assert_redirected_to '/projects/ecookbook/settings/activities' | |
|
24 | 24 | |
|
25 | 25 | # Created project specific activities... |
|
26 | 26 | project = Project.find('ecookbook') |
@@ -83,7 +83,7 class ProjectEnumerationsControllerTest < ActionController::TestCase | |||
|
83 | 83 | } |
|
84 | 84 | |
|
85 | 85 | assert_response :redirect |
|
86 | assert_redirected_to 'projects/ecookbook/settings/activities' | |
|
86 | assert_redirected_to '/projects/ecookbook/settings/activities' | |
|
87 | 87 | |
|
88 | 88 | # Created project specific activities... |
|
89 | 89 | project = Project.find('ecookbook') |
@@ -159,7 +159,7 class ProjectEnumerationsControllerTest < ActionController::TestCase | |||
|
159 | 159 | |
|
160 | 160 | delete :destroy, :project_id => 1 |
|
161 | 161 | assert_response :redirect |
|
162 | assert_redirected_to 'projects/ecookbook/settings/activities' | |
|
162 | assert_redirected_to '/projects/ecookbook/settings/activities' | |
|
163 | 163 | |
|
164 | 164 | assert_nil TimeEntryActivity.find_by_id(project_activity.id) |
|
165 | 165 | assert_nil TimeEntryActivity.find_by_id(project_activity_two.id) |
@@ -179,7 +179,7 class ProjectEnumerationsControllerTest < ActionController::TestCase | |||
|
179 | 179 | |
|
180 | 180 | delete :destroy, :project_id => 1 |
|
181 | 181 | assert_response :redirect |
|
182 | assert_redirected_to 'projects/ecookbook/settings/activities' | |
|
182 | assert_redirected_to '/projects/ecookbook/settings/activities' | |
|
183 | 183 | |
|
184 | 184 | assert_nil TimeEntryActivity.find_by_id(project_activity.id) |
|
185 | 185 | assert_equal 0, TimeEntry.find_all_by_activity_id_and_project_id(project_activity.id, 1).size, "TimeEntries still assigned to project specific activity" |
@@ -344,7 +344,7 class ProjectsControllerTest < ActionController::TestCase | |||
|
344 | 344 | @request.session[:user_id] = 2 # manager |
|
345 | 345 | post :update, :id => 1, :project => {:name => 'Test changed name', |
|
346 | 346 | :issue_custom_field_ids => ['']} |
|
347 | assert_redirected_to 'projects/ecookbook/settings' | |
|
347 | assert_redirected_to '/projects/ecookbook/settings' | |
|
348 | 348 | project = Project.find(1) |
|
349 | 349 | assert_equal 'Test changed name', project.name |
|
350 | 350 | end |
@@ -360,14 +360,14 class ProjectsControllerTest < ActionController::TestCase | |||
|
360 | 360 | def test_post_destroy |
|
361 | 361 | @request.session[:user_id] = 1 # admin |
|
362 | 362 | post :destroy, :id => 1, :confirm => 1 |
|
363 | assert_redirected_to 'admin/projects' | |
|
363 | assert_redirected_to '/admin/projects' | |
|
364 | 364 | assert_nil Project.find_by_id(1) |
|
365 | 365 | end |
|
366 | 366 | |
|
367 | 367 | def test_archive |
|
368 | 368 | @request.session[:user_id] = 1 # admin |
|
369 | 369 | post :archive, :id => 1 |
|
370 | assert_redirected_to 'admin/projects' | |
|
370 | assert_redirected_to '/admin/projects' | |
|
371 | 371 | assert !Project.find(1).active? |
|
372 | 372 | end |
|
373 | 373 | |
@@ -375,7 +375,7 class ProjectsControllerTest < ActionController::TestCase | |||
|
375 | 375 | @request.session[:user_id] = 1 # admin |
|
376 | 376 | Project.find(1).archive |
|
377 | 377 | post :unarchive, :id => 1 |
|
378 | assert_redirected_to 'admin/projects' | |
|
378 | assert_redirected_to '/admin/projects' | |
|
379 | 379 | assert Project.find(1).active? |
|
380 | 380 | end |
|
381 | 381 | |
@@ -424,7 +424,7 class ProjectsControllerTest < ActionController::TestCase | |||
|
424 | 424 | |
|
425 | 425 | def test_jump_should_redirect_to_active_tab |
|
426 | 426 | get :show, :id => 1, :jump => 'issues' |
|
427 | assert_redirected_to 'projects/ecookbook/issues' | |
|
427 | assert_redirected_to '/projects/ecookbook/issues' | |
|
428 | 428 | end |
|
429 | 429 | |
|
430 | 430 | def test_jump_should_not_redirect_to_inactive_tab |
@@ -98,7 +98,7 class RepositoriesControllerTest < ActionController::TestCase | |||
|
98 | 98 | |
|
99 | 99 | assert_no_difference "Changeset.count(:conditions => 'user_id = 3')" do |
|
100 | 100 | post :committers, :id => 1, :committers => { '0' => ['foo', '2'], '1' => ['dlopper', '3']} |
|
101 | assert_redirected_to 'projects/ecookbook/repository/committers' | |
|
101 | assert_redirected_to '/projects/ecookbook/repository/committers' | |
|
102 | 102 | assert_equal User.find(2), c.reload.user |
|
103 | 103 | end |
|
104 | 104 | end |
@@ -65,7 +65,7 class RolesControllerTest < ActionController::TestCase | |||
|
65 | 65 | :permissions => ['add_issues', 'edit_issues', 'log_time', ''], |
|
66 | 66 | :assignable => '0'} |
|
67 | 67 | |
|
68 | assert_redirected_to 'roles' | |
|
68 | assert_redirected_to '/roles' | |
|
69 | 69 | role = Role.find_by_name('RoleWithoutWorkflowCopy') |
|
70 | 70 | assert_not_nil role |
|
71 | 71 | assert_equal [:add_issues, :edit_issues, :log_time], role.permissions |
@@ -78,7 +78,7 class RolesControllerTest < ActionController::TestCase | |||
|
78 | 78 | :assignable => '0'}, |
|
79 | 79 | :copy_workflow_from => '1' |
|
80 | 80 | |
|
81 | assert_redirected_to 'roles' | |
|
81 | assert_redirected_to '/roles' | |
|
82 | 82 | role = Role.find_by_name('RoleWithWorkflowCopy') |
|
83 | 83 | assert_not_nil role |
|
84 | 84 | assert_equal Role.find(1).workflows.size, role.workflows.size |
@@ -97,7 +97,7 class RolesControllerTest < ActionController::TestCase | |||
|
97 | 97 | :permissions => ['edit_project', ''], |
|
98 | 98 | :assignable => '0'} |
|
99 | 99 | |
|
100 | assert_redirected_to 'roles' | |
|
100 | assert_redirected_to '/roles' | |
|
101 | 101 | role = Role.find(1) |
|
102 | 102 | assert_equal [:edit_project], role.permissions |
|
103 | 103 | end |
@@ -107,13 +107,13 class RolesControllerTest < ActionController::TestCase | |||
|
107 | 107 | assert r.save |
|
108 | 108 | |
|
109 | 109 | post :destroy, :id => r |
|
110 | assert_redirected_to 'roles' | |
|
110 | assert_redirected_to '/roles' | |
|
111 | 111 | assert_nil Role.find_by_id(r.id) |
|
112 | 112 | end |
|
113 | 113 | |
|
114 | 114 | def test_destroy_role_in_use |
|
115 | 115 | post :destroy, :id => 1 |
|
116 | assert_redirected_to 'roles' | |
|
116 | assert_redirected_to '/roles' | |
|
117 | 117 | assert flash[:error] == 'This role is in use and can not be deleted.' |
|
118 | 118 | assert_not_nil Role.find_by_id(1) |
|
119 | 119 | end |
@@ -139,7 +139,7 class RolesControllerTest < ActionController::TestCase | |||
|
139 | 139 | |
|
140 | 140 | def test_post_report |
|
141 | 141 | post :report, :permissions => { '0' => '', '1' => ['edit_issues'], '3' => ['add_issues', 'delete_issues']} |
|
142 | assert_redirected_to 'roles' | |
|
142 | assert_redirected_to '/roles' | |
|
143 | 143 | |
|
144 | 144 | assert_equal [:edit_issues], Role.find(1).permissions |
|
145 | 145 | assert_equal [:add_issues, :delete_issues], Role.find(3).permissions |
@@ -148,33 +148,33 class RolesControllerTest < ActionController::TestCase | |||
|
148 | 148 | |
|
149 | 149 | def test_clear_all_permissions |
|
150 | 150 | post :report, :permissions => { '0' => '' } |
|
151 | assert_redirected_to 'roles' | |
|
151 | assert_redirected_to '/roles' | |
|
152 | 152 | assert Role.find(1).permissions.empty? |
|
153 | 153 | end |
|
154 | 154 | |
|
155 | 155 | def test_move_highest |
|
156 | 156 | post :edit, :id => 3, :role => {:move_to => 'highest'} |
|
157 | assert_redirected_to 'roles' | |
|
157 | assert_redirected_to '/roles' | |
|
158 | 158 | assert_equal 1, Role.find(3).position |
|
159 | 159 | end |
|
160 | 160 | |
|
161 | 161 | def test_move_higher |
|
162 | 162 | position = Role.find(3).position |
|
163 | 163 | post :edit, :id => 3, :role => {:move_to => 'higher'} |
|
164 | assert_redirected_to 'roles' | |
|
164 | assert_redirected_to '/roles' | |
|
165 | 165 | assert_equal position - 1, Role.find(3).position |
|
166 | 166 | end |
|
167 | 167 | |
|
168 | 168 | def test_move_lower |
|
169 | 169 | position = Role.find(2).position |
|
170 | 170 | post :edit, :id => 2, :role => {:move_to => 'lower'} |
|
171 | assert_redirected_to 'roles' | |
|
171 | assert_redirected_to '/roles' | |
|
172 | 172 | assert_equal position + 1, Role.find(2).position |
|
173 | 173 | end |
|
174 | 174 | |
|
175 | 175 | def test_move_lowest |
|
176 | 176 | post :edit, :id => 2, :role => {:move_to => 'lowest'} |
|
177 | assert_redirected_to 'roles' | |
|
177 | assert_redirected_to '/roles' | |
|
178 | 178 | assert_equal Role.count, Role.find(2).position |
|
179 | 179 | end |
|
180 | 180 | end |
@@ -126,7 +126,7 class SearchControllerTest < ActionController::TestCase | |||
|
126 | 126 | def test_quick_jump_to_issue |
|
127 | 127 | # issue of a public project |
|
128 | 128 | get :index, :q => "3" |
|
129 | assert_redirected_to 'issues/3' | |
|
129 | assert_redirected_to '/issues/3' | |
|
130 | 130 | |
|
131 | 131 | # issue of a private project |
|
132 | 132 | get :index, :q => "4" |
@@ -50,7 +50,7 class SettingsControllerTest < ActionController::TestCase | |||
|
50 | 50 | :notified_events => %w(issue_added issue_updated news_added), |
|
51 | 51 | :emails_footer => 'Test footer' |
|
52 | 52 | } |
|
53 | assert_redirected_to 'settings/edit' | |
|
53 | assert_redirected_to '/settings/edit' | |
|
54 | 54 | assert_equal 'functional@test.foo', Setting.mail_from |
|
55 | 55 | assert !Setting.bcc_recipients? |
|
56 | 56 | assert_equal %w(issue_added issue_updated news_added), Setting.notified_events |
@@ -44,7 +44,7 class AccountTest < ActionController::IntegrationTest | |||
|
44 | 44 | |
|
45 | 45 | # User logs in with 'autologin' checked |
|
46 | 46 | post '/login', :username => user.login, :password => 'admin', :autologin => 1 |
|
47 | assert_redirected_to 'my/page' | |
|
47 | assert_redirected_to '/my/page' | |
|
48 | 48 | token = Token.find :first |
|
49 | 49 | assert_not_nil token |
|
50 | 50 | assert_equal user, token.user |
@@ -105,7 +105,7 class AccountTest < ActionController::IntegrationTest | |||
|
105 | 105 | |
|
106 | 106 | post 'account/register', :user => {:login => "newuser", :language => "en", :firstname => "New", :lastname => "User", :mail => "newuser@foo.bar"}, |
|
107 | 107 | :password => "newpass", :password_confirmation => "newpass" |
|
108 | assert_redirected_to 'my/account' | |
|
108 | assert_redirected_to '/my/account' | |
|
109 | 109 | follow_redirect! |
|
110 | 110 | assert_response :success |
|
111 | 111 | assert_template 'my/account' |
@@ -152,7 +152,7 class AccountTest < ActionController::IntegrationTest | |||
|
152 | 152 | AuthSource.expects(:authenticate).returns({:login => 'foo', :firstname => 'Foo', :lastname => 'Smith', :mail => 'foo@bar.com', :auth_source_id => 66}) |
|
153 | 153 | |
|
154 | 154 | post 'account/login', :username => 'foo', :password => 'bar' |
|
155 | assert_redirected_to 'my/page' | |
|
155 | assert_redirected_to '/my/page' | |
|
156 | 156 | |
|
157 | 157 | user = User.find_by_login('foo') |
|
158 | 158 | assert user.is_a?(User) |
@@ -187,7 +187,7 class AccountTest < ActionController::IntegrationTest | |||
|
187 | 187 | sid = session[:session_id] |
|
188 | 188 | |
|
189 | 189 | post '/login', :username => 'admin', :password => 'admin' |
|
190 | assert_redirected_to 'my/page' | |
|
190 | assert_redirected_to '/my/page' | |
|
191 | 191 | assert_not_equal sid, session[:session_id], "login should reset session" |
|
192 | 192 | assert_equal 1, session[:user_id] |
|
193 | 193 | sid = session[:session_id] |
@@ -72,7 +72,7 class IssuesTest < ActionController::IntegrationTest | |||
|
72 | 72 | put 'issues/1', |
|
73 | 73 | :notes => 'Some notes', |
|
74 | 74 | :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'This is an attachment'}} |
|
75 | assert_redirected_to "issues/1" | |
|
75 | assert_redirected_to "/issues/1" | |
|
76 | 76 | |
|
77 | 77 | # make sure attachment was saved |
|
78 | 78 | attachment = Issue.find(1).attachments.find_by_filename("testfile.txt") |
@@ -27,7 +27,7 class ProjectsTest < ActionController::IntegrationTest | |||
|
27 | 27 | assert_response :success |
|
28 | 28 | assert_template "admin/projects" |
|
29 | 29 | post "projects/archive", :id => 1 |
|
30 | assert_redirected_to "admin/projects" | |
|
30 | assert_redirected_to "/admin/projects" | |
|
31 | 31 | assert !Project.find(1).active? |
|
32 | 32 | |
|
33 | 33 | get 'projects/1' |
@@ -36,7 +36,7 class ProjectsTest < ActionController::IntegrationTest | |||
|
36 | 36 | assert_response 403 |
|
37 | 37 | |
|
38 | 38 | post "projects/unarchive", :id => 1 |
|
39 | assert_redirected_to "admin/projects" | |
|
39 | assert_redirected_to "/admin/projects" | |
|
40 | 40 | assert Project.find(1).active? |
|
41 | 41 | get "projects/1" |
|
42 | 42 | assert_response :success |
General Comments 0
You need to be logged in to leave comments.
Login now