diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-06-08 14:59:26 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-06-08 14:59:26 +0000 |
commit | dfe62d7f51b4aadb1034e2e64de2524b30dfd17b (patch) | |
tree | 30356cfb29fe20a91246f08aa8656e216c331f15 /test/unit/repository_test.rb | |
parent | 05cd95987f1946f2bce138d339ef64511e15bde6 (diff) | |
download | redmine-dfe62d7f51b4aadb1034e2e64de2524b30dfd17b.tar.gz redmine-dfe62d7f51b4aadb1034e2e64de2524b30dfd17b.zip |
Ability to disable unused SCM adapters in application settings.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1507 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_test.rb')
-rw-r--r-- | test/unit/repository_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb index 7764ee04a..270b0bea1 100644 --- a/test/unit/repository_test.rb +++ b/test/unit/repository_test.rb @@ -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 |