Mercurial > hg > soundsoftware-site
comparison test/unit/repository_test.rb @ 128:07fa8a8b56a8
Update to Redmine trunk rev 4732
author | Chris Cannam |
---|---|
date | Wed, 19 Jan 2011 15:04:22 +0000 |
parents | 8661b858af72 |
children | 051f544170fe |
comparison
equal
deleted
inserted
replaced
119:8661b858af72 | 128:07fa8a8b56a8 |
---|---|
60 end | 60 end |
61 end | 61 end |
62 | 62 |
63 def test_should_not_create_with_disabled_scm | 63 def test_should_not_create_with_disabled_scm |
64 # disable Subversion | 64 # disable Subversion |
65 Setting.enabled_scm = ['Darcs', 'Git'] | 65 with_settings :enabled_scm => ['Darcs', 'Git'] do |
66 repository = Repository::Subversion.new(:project => Project.find(3), :url => "svn://localhost") | 66 repository = Repository::Subversion.new(:project => Project.find(3), :url => "svn://localhost") |
67 assert !repository.save | 67 assert !repository.save |
68 assert_equal I18n.translate('activerecord.errors.messages.invalid'), repository.errors.on(:type) | 68 assert_equal I18n.translate('activerecord.errors.messages.invalid'), repository.errors.on(:type) |
69 # re-enable Subversion for following tests | 69 end |
70 Setting.delete_all | |
71 end | 70 end |
72 | 71 |
73 def test_scan_changesets_for_issue_ids | 72 def test_scan_changesets_for_issue_ids |
74 Setting.default_language = 'en' | 73 Setting.default_language = 'en' |
75 Setting.notified_events = ['issue_added','issue_updated'] | 74 Setting.notified_events = ['issue_added','issue_updated'] |