diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-02-11 17:38:30 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-02-11 17:38:30 +0000 |
commit | 514f2d6c0fa6e1eb8e1f7f1a1dbb733dc81776dd (patch) | |
tree | c7a20f127d09fcd7348c0db01ef98a84e85e7e41 /test/unit/issue_test.rb | |
parent | eed4954f0a43883b4ced7aa32f152538816b8d96 (diff) | |
download | redmine-514f2d6c0fa6e1eb8e1f7f1a1dbb733dc81776dd.tar.gz redmine-514f2d6c0fa6e1eb8e1f7f1a1dbb733dc81776dd.zip |
Fixed that custom_field_values are not reloaded on #reload (#13119).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11349 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/issue_test.rb')
-rw-r--r-- | test/unit/issue_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index ad283e64a..1ffc24dd5 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -421,6 +421,21 @@ class IssueTest < ActiveSupport::TestCase assert_equal 'MySQL', issue.custom_field_value(1) end + def test_reload_should_reload_custom_field_values + issue = Issue.generate! + issue.custom_field_values = {'2' => 'Foo'} + issue.save! + + issue = Issue.order('id desc').first + assert_equal 'Foo', issue.custom_field_value(2) + + issue.custom_field_values = {'2' => 'Bar'} + assert_equal 'Bar', issue.custom_field_value(2) + + issue.reload + assert_equal 'Foo', issue.custom_field_value(2) + end + def test_should_update_issue_with_disabled_tracker p = Project.find(1) issue = Issue.find(1) |