mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 02:46:13 +01:00
Adds a setting that allows to reference/fix issues of all projects (#3087).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8750 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -192,6 +192,36 @@ class ChangesetTest < ActiveSupport::TestCase
|
||||
assert c.issues.first.project != c.project
|
||||
end
|
||||
|
||||
def test_commit_referencing_a_project_with_commit_cross_project_ref_disabled
|
||||
r = Repository::Subversion.create!(
|
||||
:project => Project.find(3),
|
||||
:url => 'svn://localhost/test')
|
||||
|
||||
with_settings :commit_cross_project_ref => '0' do
|
||||
c = Changeset.new(:repository => r,
|
||||
:committed_on => Time.now,
|
||||
:comments => 'refs #4, an issue of a different project',
|
||||
:revision => '12345')
|
||||
assert c.save
|
||||
assert_equal [], c.issue_ids
|
||||
end
|
||||
end
|
||||
|
||||
def test_commit_referencing_a_project_with_commit_cross_project_ref_enabled
|
||||
r = Repository::Subversion.create!(
|
||||
:project => Project.find(3),
|
||||
:url => 'svn://localhost/test')
|
||||
|
||||
with_settings :commit_cross_project_ref => '1' do
|
||||
c = Changeset.new(:repository => r,
|
||||
:committed_on => Time.now,
|
||||
:comments => 'refs #4, an issue of a different project',
|
||||
:revision => '12345')
|
||||
assert c.save
|
||||
assert_equal [4], c.issue_ids
|
||||
end
|
||||
end
|
||||
|
||||
def test_text_tag_revision
|
||||
c = Changeset.new(:revision => '520')
|
||||
assert_equal 'r520', c.text_tag
|
||||
|
||||
Reference in New Issue
Block a user