Ability to disable unused SCM adapters in application settings.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1507 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-06-08 14:59:26 +00:00
parent 05cd95987f
commit dfe62d7f51
34 changed files with 64 additions and 7 deletions

View File

@@ -45,6 +45,14 @@ class RepositoryTest < Test::Unit::TestCase
assert_equal repository, project.repository
end
def test_should_not_create_with_disabled_scm
# disable Subversion
Setting.enabled_scm = ['Darcs', 'Git']
repository = Repository::Subversion.new(:project => Project.find(3), :url => "svn://localhost")
assert !repository.save
assert_equal :activerecord_error_invalid, repository.errors.on(:type)
end
def test_scan_changesets_for_issue_ids
# choosing a status to apply to fix issues
Setting.commit_fix_status_id = IssueStatus.find(:first, :conditions => ["is_closed = ?", true]).id