Commit 86cbaaa5 authored by Toshi MARUYAMA's avatar Toshi MARUYAMA Committed by Eric Davis

scm: mercurial: code clean up unit app test.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4852 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent cb467e3a
...@@ -22,17 +22,17 @@ class RepositoryMercurialTest < ActiveSupport::TestCase ...@@ -22,17 +22,17 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
# No '..' in the repository path # No '..' in the repository path
REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/mercurial_repository' REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/mercurial_repository'
def setup def setup
@project = Project.find(1) @project = Project.find(1)
assert @repository = Repository::Mercurial.create(:project => @project, :url => REPOSITORY_PATH) @repository = Repository::Mercurial.create(:project => @project, :url => REPOSITORY_PATH)
assert @repository
end end
if File.directory?(REPOSITORY_PATH) if File.directory?(REPOSITORY_PATH)
def test_fetch_changesets_from_scratch def test_fetch_changesets_from_scratch
@repository.fetch_changesets @repository.fetch_changesets
@repository.reload @repository.reload
assert_equal 17, @repository.changesets.count assert_equal 17, @repository.changesets.count
assert_equal 25, @repository.changes.count assert_equal 25, @repository.changes.count
assert_equal "Initial import.\nThe repository contains 3 files.", assert_equal "Initial import.\nThe repository contains 3 files.",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment