diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-11-01 08:11:36 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-11-01 08:11:36 +0000 |
commit | 9178d4748f19adee08e5b9d58ea1176836249eb6 (patch) | |
tree | 4c9ee2b9b5d57c31a1872610494e425f1b3a0df5 /test/unit | |
parent | 786e3cff10f2c6989162f5dacc9547914dd09f76 (diff) | |
download | redmine-9178d4748f19adee08e5b9d58ea1176836249eb6.tar.gz redmine-9178d4748f19adee08e5b9d58ea1176836249eb6.zip |
Default target version for new issues (#1828).
git-svn-id: http://svn.redmine.org/redmine/trunk@14786 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/issue_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index 1da9f71e2..1dea102a5 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -496,6 +496,14 @@ class IssueTest < ActiveSupport::TestCase assert_equal custom_value.id, issue.custom_value_for(field).id end + def test_setting_project_should_set_version_to_default_version + version = Version.generate!(:project_id => 1) + Project.find(1).update_attribute(:default_version_id, version.id) + + issue = Issue.new(:project_id => 1) + assert_equal version, issue.fixed_version + end + def test_should_not_update_custom_fields_on_changing_tracker_with_different_custom_fields issue = Issue.create!(:project_id => 1, :tracker_id => 1, :author_id => 1, :status_id => 1, :subject => 'Test', |