]> source.dussan.org Git - redmine.git/commitdiff
scm: add test to strip subversion repository path at unit repository test.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 30 Aug 2011 16:00:27 +0000 (16:00 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 30 Aug 2011 16:00:27 +0000 (16:00 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6826 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/repository_test.rb

index 5f631f04c0156d9d4d3ae952a74bd53c52f9acf5..0e21a0cbae218402df28a668565c6a427d1af330 100644 (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!(