summaryrefslogtreecommitdiffstats
path: root/test/unit/repository_subversion_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-03-17 03:53:34 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-03-17 03:53:34 +0000
commitf065c6f4613193a6e9f7565d99473cd13a87871c (patch)
treec844babffe0694e2bdde4368018b7c71becb251c /test/unit/repository_subversion_test.rb
parent8d0d1d50ccbab8417e36218cfded181db5cc1710 (diff)
downloadredmine-f065c6f4613193a6e9f7565d99473cd13a87871c.tar.gz
redmine-f065c6f4613193a6e9f7565d99473cd13a87871c.zip
scm: subversion: code clean up unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5162 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_subversion_test.rb')
-rw-r--r--test/unit/repository_subversion_test.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/unit/repository_subversion_test.rb b/test/unit/repository_subversion_test.rb
index a669b2024..ca3bd9b48 100644
--- a/test/unit/repository_subversion_test.rb
+++ b/test/unit/repository_subversion_test.rb
@@ -19,13 +19,14 @@ require File.expand_path('../../test_helper', __FILE__)
class RepositorySubversionTest < ActiveSupport::TestCase
fixtures :projects, :repositories, :enabled_modules, :users, :roles
-
+
def setup
@project = Project.find(3)
- assert @repository = Repository::Subversion.create(:project => @project,
+ @repository = Repository::Subversion.create(:project => @project,
:url => "file://#{self.class.repository_path('subversion')}")
+ assert @repository
end
-
+
if repository_configured?('subversion')
def test_fetch_changesets_from_scratch
@repository.fetch_changesets
@@ -35,7 +36,7 @@ class RepositorySubversionTest < ActiveSupport::TestCase
assert_equal 20, @repository.changes.count
assert_equal 'Initial import.', @repository.changesets.find_by_revision('1').comments
end
-
+
def test_fetch_changesets_incremental
@repository.fetch_changesets
# Remove changesets with revision > 5
@@ -46,7 +47,7 @@ class RepositorySubversionTest < ActiveSupport::TestCase
@repository.fetch_changesets
assert_equal 11, @repository.changesets.count
end
-
+
def test_latest_changesets
@repository.fetch_changesets
@@ -76,7 +77,9 @@ class RepositorySubversionTest < ActiveSupport::TestCase
def test_directory_listing_with_square_brackets_in_base
@project = Project.find(3)
- @repository = Repository::Subversion.create(:project => @project, :url => "file:///#{self.class.repository_path('subversion')}/subversion_test/[folder_with_brackets]")
+ @repository = Repository::Subversion.create(
+ :project => @project,
+ :url => "file:///#{self.class.repository_path('subversion')}/subversion_test/[folder_with_brackets]")
@repository.fetch_changesets
@repository.reload