diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-10-29 13:47:28 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-10-29 13:47:28 +0000 |
commit | 1919f7233f2d43527c3038553268805c36896123 (patch) | |
tree | d7afa940e281a30ffac52cdf6626159425ce6166 /test/unit | |
parent | 6d8635aed9fcdcb64ac7636e00ea956bebf2074f (diff) | |
download | redmine-1919f7233f2d43527c3038553268805c36896123.tar.gz redmine-1919f7233f2d43527c3038553268805c36896123.zip |
find_referenced_issue_by_id fails with RangeError for large numbers (#21071).
git-svn-id: http://svn.redmine.org/redmine/trunk@14758 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/changeset_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/changeset_test.rb b/test/unit/changeset_test.rb index fbce05cd5..6ba02aa56 100644 --- a/test/unit/changeset_test.rb +++ b/test/unit/changeset_test.rb @@ -165,6 +165,18 @@ class ChangesetTest < ActiveSupport::TestCase assert_equal [1,2,3], c.issue_ids.sort end + def test_ref_keywords_with_large_number_should_not_error + Setting.commit_ref_keywords = '*' + c = Changeset.new(:repository => Project.find(1).repository, + :committed_on => Time.now, + :comments => 'Out of range #2010021810000121', + :revision => '12345') + assert_nothing_raised do + assert c.save + end + assert_equal [], c.issue_ids.sort + end + def test_update_keywords_with_changes_should_create_journal issue = Issue.generate!(:project_id => 1, :status_id => 1) |