@@ -72,7 +72,7 class AdminControllerTest < Test::Unit::TestCase | |||
|
72 | 72 | |
|
73 | 73 | def test_test_email |
|
74 | 74 | get :test_email |
|
75 | assert_redirected_to 'settings/edit' | |
|
75 | assert_redirected_to '/settings/edit?tab=notifications' | |
|
76 | 76 | mail = ActionMailer::Base.deliveries.last |
|
77 | 77 | assert_kind_of TMail::Mail, mail |
|
78 | 78 | user = User.find(1) |
@@ -75,7 +75,7 class AttachmentsControllerTest < Test::Unit::TestCase | |||
|
75 | 75 | |
|
76 | 76 | def test_anonymous_on_private_private |
|
77 | 77 | get :download, :id => 7 |
|
78 | assert_redirected_to 'account/login' | |
|
78 | assert_redirected_to '/login?back_url=http%3A%2F%2Ftest.host%2Fattachments%2Fdownload%2F7' | |
|
79 | 79 | end |
|
80 | 80 | |
|
81 | 81 | def test_destroy_issue_attachment |
@@ -120,7 +120,7 class AttachmentsControllerTest < Test::Unit::TestCase | |||
|
120 | 120 | |
|
121 | 121 | def test_destroy_without_permission |
|
122 | 122 | post :destroy, :id => 3 |
|
123 | assert_redirected_to '/login' | |
|
123 | assert_redirected_to '/login?back_url=http%3A%2F%2Ftest.host%2Fattachments%2Fdestroy%2F3' | |
|
124 | 124 | assert Attachment.find_by_id(3) |
|
125 | 125 | end |
|
126 | 126 | end |
@@ -301,7 +301,7 class IssuesControllerTest < Test::Unit::TestCase | |||
|
301 | 301 | :priority_id => 5, |
|
302 | 302 | :estimated_hours => '', |
|
303 | 303 | :custom_field_values => {'2' => 'Value for field 2'}} |
|
304 |
assert_redirected_to 'issues |
|
|
304 | assert_redirected_to :controller => 'issues', :action => 'show' | |
|
305 | 305 | |
|
306 | 306 | issue = Issue.find_by_subject('This is the test_new issue') |
|
307 | 307 | assert_not_nil issue |
@@ -320,7 +320,7 class IssuesControllerTest < Test::Unit::TestCase | |||
|
320 | 320 | :subject => 'This is the test_new issue', |
|
321 | 321 | :description => 'This is the description', |
|
322 | 322 | :priority_id => 5} |
|
323 |
assert_redirected_to 'issues |
|
|
323 | assert_redirected_to :controller => 'issues', :action => 'show' | |
|
324 | 324 | end |
|
325 | 325 | |
|
326 | 326 | def test_post_new_with_required_custom_field_and_without_custom_fields_param |
@@ -352,9 +352,10 class IssuesControllerTest < Test::Unit::TestCase | |||
|
352 | 352 | :priority_id => 5, |
|
353 | 353 | :watcher_user_ids => ['2', '3']} |
|
354 | 354 | end |
|
355 | assert_redirected_to 'issues/show' | |
|
356 | ||
|
357 | 355 | issue = Issue.find_by_subject('This is a new issue with watchers') |
|
356 | assert_not_nil issue | |
|
357 | assert_redirected_to :controller => 'issues', :action => 'show', :id => issue | |
|
358 | ||
|
358 | 359 | # Watchers added |
|
359 | 360 | assert_equal [2, 3], issue.watcher_user_ids.sort |
|
360 | 361 | assert issue.watched_by?(User.find(3)) |
@@ -103,7 +103,7 class TimelogControllerTest < Test::Unit::TestCase | |||
|
103 | 103 | r.permissions_will_change! |
|
104 | 104 | r.save |
|
105 | 105 | get :report |
|
106 | assert_redirected_to '/account/login' | |
|
106 | assert_redirected_to '/login?back_url=http%3A%2F%2Ftest.host%2Ftimelog%2Freport' | |
|
107 | 107 | end |
|
108 | 108 | |
|
109 | 109 | def test_report_all_projects_one_criteria |
@@ -60,13 +60,13 class UsersControllerTest < Test::Unit::TestCase | |||
|
60 | 60 | def test_edit_membership |
|
61 | 61 | post :edit_membership, :id => 2, :membership_id => 1, |
|
62 | 62 | :membership => { :role_id => 2} |
|
63 | assert_redirected_to 'users/edit/2' | |
|
63 | assert_redirected_to '/users/edit/2?tab=memberships' | |
|
64 | 64 | assert_equal 2, Member.find(1).role_id |
|
65 | 65 | end |
|
66 | 66 | |
|
67 | 67 | def test_destroy_membership |
|
68 | 68 | post :destroy_membership, :id => 2, :membership_id => 1 |
|
69 | assert_redirected_to 'users/edit/2' | |
|
69 | assert_redirected_to '/users/edit/2?tab=memberships' | |
|
70 | 70 | assert_nil Member.find_by_id(1) |
|
71 | 71 | end |
|
72 | 72 | end |
@@ -52,7 +52,7 class VersionsControllerTest < Test::Unit::TestCase | |||
|
52 | 52 | post :edit, :id => 2, |
|
53 | 53 | :version => { :name => 'New version name', |
|
54 | 54 | :effective_date => Date.today.strftime("%Y-%m-%d")} |
|
55 | assert_redirected_to 'projects/settings/ecookbook' | |
|
55 | assert_redirected_to '/projects/settings/ecookbook?tab=versions' | |
|
56 | 56 | version = Version.find(2) |
|
57 | 57 | assert_equal 'New version name', version.name |
|
58 | 58 | assert_equal Date.today, version.effective_date |
@@ -61,7 +61,7 class VersionsControllerTest < Test::Unit::TestCase | |||
|
61 | 61 | def test_destroy |
|
62 | 62 | @request.session[:user_id] = 2 |
|
63 | 63 | post :destroy, :id => 3 |
|
64 | assert_redirected_to 'projects/settings/ecookbook' | |
|
64 | assert_redirected_to '/projects/settings/ecookbook?tab=versions' | |
|
65 | 65 | assert_nil Version.find_by_id(3) |
|
66 | 66 | end |
|
67 | 67 |
@@ -210,7 +210,7 class WikiControllerTest < Test::Unit::TestCase | |||
|
210 | 210 | assert page.protected? |
|
211 | 211 | @request.session[:user_id] = 2 |
|
212 | 212 | post :protect, :id => 1, :page => page.title, :protected => '0' |
|
213 | assert_redirected_to 'wiki/ecookbook' | |
|
213 | assert_redirected_to '/wiki/ecookbook/CookBook_documentation' | |
|
214 | 214 | assert !page.reload.protected? |
|
215 | 215 | end |
|
216 | 216 |
@@ -44,7 +44,7 class WikisControllerTest < Test::Unit::TestCase | |||
|
44 | 44 | def test_destroy |
|
45 | 45 | @request.session[:user_id] = 1 |
|
46 | 46 | post :destroy, :id => 1, :confirm => 1 |
|
47 | assert_redirected_to 'projects/settings/ecookbook' | |
|
47 | assert_redirected_to '/projects/settings/ecookbook?tab=wiki' | |
|
48 | 48 | assert_nil Project.find(1).wiki |
|
49 | 49 | end |
|
50 | 50 |
@@ -68,7 +68,7 class WorkflowsControllerTest < Test::Unit::TestCase | |||
|
68 | 68 | |
|
69 | 69 | def test_post_edit |
|
70 | 70 | post :edit, :role_id => 2, :tracker_id => 1, :issue_status => {'4' => ['5'], '3' => ['1', '2']} |
|
71 | assert_redirected_to 'workflows/edit' | |
|
71 | assert_redirected_to '/workflows/edit?role_id=2&tracker_id=1' | |
|
72 | 72 | |
|
73 | 73 | assert_equal 3, Workflow.count(:conditions => {:tracker_id => 1, :role_id => 2}) |
|
74 | 74 | assert_not_nil Workflow.find(:first, :conditions => {:role_id => 2, :tracker_id => 1, :old_status_id => 3, :new_status_id => 2}) |
General Comments 0
You need to be logged in to leave comments.
Login now