More function tests for AdminController.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9170 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-03-10 13:41:56 +00:00
parent 24bd39d8ed
commit 25620a7429
1 changed files with 9 additions and 0 deletions

View File

@ -74,6 +74,15 @@ class AdminControllerTest < ActionController::TestCase
assert IssueStatus.find_by_name('Nouveau') assert IssueStatus.find_by_name('Nouveau')
end end
def test_load_default_configuration_data_should_rescue_error
delete_configuration_data
Redmine::DefaultData::Loader.stubs(:load).raises(Exception.new("Something went wrong"))
post :default_configuration, :lang => 'fr'
assert_response :redirect
assert_not_nil flash[:error]
assert_match /Something went wrong/, flash[:error]
end
def test_test_email def test_test_email
get :test_email get :test_email
assert_redirected_to '/settings/edit?tab=notifications' assert_redirected_to '/settings/edit?tab=notifications'