Use named routes in controllers.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10981 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-12-11 17:51:30 +00:00
parent cf66561b1e
commit 0b96094680
13 changed files with 370 additions and 39 deletions

View File

@@ -90,7 +90,7 @@ class AdminControllerTest < ActionController::TestCase
ActionMailer::Base.deliveries.clear
get :test_email
assert_redirected_to '/settings/edit?tab=notifications'
assert_redirected_to '/settings?tab=notifications'
mail = ActionMailer::Base.deliveries.last
assert_not_nil mail
user = User.find(1)
@@ -100,7 +100,7 @@ class AdminControllerTest < ActionController::TestCase
def test_test_email_failure_should_display_the_error
Mailer.stubs(:test_email).raises(Exception, 'Some error message')
get :test_email
assert_redirected_to '/settings/edit?tab=notifications'
assert_redirected_to '/settings?tab=notifications'
assert_match /Some error message/, flash[:error]
end