summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-02-16 11:16:29 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-02-16 11:16:29 +0000
commit862058795fb215bef4569bce1d883f0c1adafa27 (patch)
tree083cfd9decba2301a152cc4a5330efca388ed273 /test
parent5274230fda69f30c76755fc27f4b985c1028e64b (diff)
downloadredmine-862058795fb215bef4569bce1d883f0c1adafa27.tar.gz
redmine-862058795fb215bef4569bce1d883f0c1adafa27.zip
scm: git: change project id of unit app test from 1 to 3.
Project id 1 has Subversion fixtures. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4850 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/repository_git_test.rb17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/unit/repository_git_test.rb b/test/unit/repository_git_test.rb
index f6f3f6ede..407250c16 100644
--- a/test/unit/repository_git_test.rb
+++ b/test/unit/repository_git_test.rb
@@ -18,25 +18,26 @@
require File.expand_path('../../test_helper', __FILE__)
class RepositoryGitTest < ActiveSupport::TestCase
- fixtures :projects, :repositories, :enabled_modules, :users, :roles
-
+ fixtures :projects, :repositories, :enabled_modules, :users, :roles
+
# No '..' in the repository path
REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/git_repository'
REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin?
-
+
def setup
- @project = Project.find(1)
- assert @repository = Repository::Git.create(:project => @project, :url => REPOSITORY_PATH)
+ @project = Project.find(3)
+ @repository = Repository::Git.create(:project => @project, :url => REPOSITORY_PATH)
+ assert @repository
end
-
+
if File.directory?(REPOSITORY_PATH)
def test_fetch_changesets_from_scratch
@repository.fetch_changesets
@repository.reload
-
+
assert_equal 15, @repository.changesets.count
assert_equal 24, @repository.changes.count
-
+
commit = @repository.changesets.find(:first, :order => 'committed_on ASC')
assert_equal "Initial import.\nThe repository contains 3 files.", commit.comments
assert_equal "jsmith <jsmith@foo.bar>", commit.committer