scm: add test to strip subversion repository path at unit repository test.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6826 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-08-30 16:00:27 +00:00
parent 5bb790eed4
commit 9f7cb2d045
1 changed files with 9 additions and 0 deletions

View File

@ -151,6 +151,15 @@ class RepositoryTest < ActiveSupport::TestCase
assert_equal 'foo', repository.root_url
end
def test_for_urls_strip_subversion
repository = Repository::Subversion.create(
:project => Project.find(4),
:url => ' file:///dummy ')
assert repository.save
repository.reload
assert_equal 'file:///dummy', repository.url
end
def test_manual_user_mapping
assert_no_difference "Changeset.count(:conditions => 'user_id <> 2')" do
c = Changeset.create!(