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

test/unit/repository_test.rb

index 0e21a0cbae218402df28a668565c6a427d1af330..c1e062495d55fcb9e9f66f1f50821f5d6156b011 100644 (file)
@@ -160,6 +160,15 @@ class RepositoryTest < ActiveSupport::TestCase
     assert_equal 'file:///dummy', repository.url
   end
 
+  def test_for_urls_strip_git
+    repository = Repository::Git.create(
+        :project => Project.find(4),
+        :url => ' c:\dummy   ')
+    assert repository.save
+    repository.reload
+    assert_equal 'c:\dummy', repository.url
+  end
+
   def test_manual_user_mapping
     assert_no_difference "Changeset.count(:conditions => 'user_id <> 2')" do
       c = Changeset.create!(