diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-09 12:07:35 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-09 12:07:35 +0000 |
commit | 6157d20ec012fb34da66f0fe921b32036d582264 (patch) | |
tree | 886b85026790d57edb2f45ce11735af8afe16579 /test | |
parent | 858eba2f1ca63f7ee643171e3edd63e60e69901a (diff) | |
download | redmine-6157d20ec012fb34da66f0fe921b32036d582264.tar.gz redmine-6157d20ec012fb34da66f0fe921b32036d582264.zip |
Git adapter: use commit time instead of author time (#2108).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1999 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/repository_git_test.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/unit/repository_git_test.rb b/test/unit/repository_git_test.rb index 0098273be..da95d439f 100644 --- a/test/unit/repository_git_test.rb +++ b/test/unit/repository_git_test.rb @@ -36,7 +36,19 @@ class RepositoryGitTest < Test::Unit::TestCase assert_equal 6, @repository.changesets.count assert_equal 11, @repository.changes.count - assert_equal "Initial import.\nThe repository contains 3 files.", @repository.changesets.find(:first, :order => 'id ASC').comments + + 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 + # TODO: add a commit with commit time <> author time to the test repository + assert_equal "2007-12-14 09:22:52".to_time, commit.committed_on + assert_equal "2007-12-14".to_date, commit.commit_date + assert_equal "7234cb2750b63f47bff735edc50a1c0a433c2518", commit.revision + assert_equal "7234cb2750b63f47bff735edc50a1c0a433c2518", commit.scmid + assert_equal 3, commit.changes.count + change = commit.changes.sort_by(&:path).first + assert_equal "README", change.path + assert_equal "A", change.action end def test_fetch_changesets_incremental |