diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-12-09 05:54:51 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-12-09 05:54:51 +0000 |
commit | 63d27a5389a409249b54ed731a8479ebb17ac7a3 (patch) | |
tree | fff91b6c4d8aa0668e26cd7a05e5dfc9bf957803 /test/functional | |
parent | c8556330c15ba247a14c8c8f80fecdbd5a414780 (diff) | |
download | redmine-63d27a5389a409249b54ed731a8479ebb17ac7a3.tar.gz redmine-63d27a5389a409249b54ed731a8479ebb17ac7a3.zip |
Rails3: test: replace deprecated Errors#on to Errors#[] and join with to_s at test/functional/issues_controller_test.rb
On Rails2, Errors#[] returns single error if one error raises.
But, on Rails3, Errors#[] always returns the array.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8133 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/issues_controller_test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 5f3f34522..951cf90be 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -1077,7 +1077,8 @@ class IssuesControllerTest < ActionController::TestCase assert_template 'new' issue = assigns(:issue) assert_not_nil issue - assert_equal I18n.translate('activerecord.errors.messages.invalid'), issue.errors.on(:custom_values) + assert_equal I18n.translate('activerecord.errors.messages.invalid'), + issue.errors[:custom_values].to_s end def test_post_create_with_watchers |