summaryrefslogtreecommitdiffstats
path: root/test/functional/admin_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-10 13:41:56 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-10 13:41:56 +0000
commit25620a74293aa61137aebd267d9a07a936fcd476 (patch)
tree83e8ce4d74f06a6011ca425fd60961537b6a8569 /test/functional/admin_controller_test.rb
parent24bd39d8ed52da07933b2c5954ef00d93aa3ef3f (diff)
downloadredmine-25620a74293aa61137aebd267d9a07a936fcd476.tar.gz
redmine-25620a74293aa61137aebd267d9a07a936fcd476.zip
More function tests for AdminController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9170 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/admin_controller_test.rb')
-rw-r--r--test/functional/admin_controller_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb
index dea8b301e..2ba84179e 100644
--- a/test/functional/admin_controller_test.rb
+++ b/test/functional/admin_controller_test.rb
@@ -74,6 +74,15 @@ class AdminControllerTest < ActionController::TestCase
assert IssueStatus.find_by_name('Nouveau')
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
get :test_email
assert_redirected_to '/settings/edit?tab=notifications'