Check that git changeset is not in the database before creating it (#1419).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1953 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-10-25 10:23:29 +00:00
parent 5f9f6ea2e1
commit 8236563d6b
2 changed files with 17 additions and 15 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ class RepositoryGitTest < Test::Unit::TestCase
def test_fetch_changesets_incremental
@repository.fetch_changesets
# Remove the 3 latest changesets
@repository.changesets.find(:all, :order => 'id DESC', :limit => 3).each(&:destroy)
@repository.changesets.find(:all, :order => 'committed_on DESC', :limit => 3).each(&:destroy)
@repository.reload
assert_equal 3, @repository.changesets.count