From 9cc83b425ba7643c7f92dafd5c95ae7d71e31cb5 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 6 Sep 2011 13:57:49 +0000 Subject: [PATCH] Rails3: scm: git: fix error of test_fetch_changesets_from_scratch at unit model test On Rails 3.1, following error raises. test_fetch_changesets_from_scratch(RepositoryGitTest): ActiveRecord::HasManyThroughCantAssociateThroughHasOneOrManyReflection: Cannot modify association 'Repository::Git#changes' because the source reflection class 'Change' is associated to 'Changeset' via :has_many. test/unit/repository_git_test.rb:68:in `test_fetch_changesets_from_scratch' git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7062 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/repository_git_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/unit/repository_git_test.rb b/test/unit/repository_git_test.rb index 7cdcfbc2b..a0bb1b2d3 100644 --- a/test/unit/repository_git_test.rb +++ b/test/unit/repository_git_test.rb @@ -64,8 +64,9 @@ class RepositoryGitTest < ActiveSupport::TestCase def test_fetch_changesets_from_scratch assert_nil @repository.extra_info + assert_equal 0, @repository.changesets.count @repository.fetch_changesets - @repository.reload + @project.reload assert_equal 21, @repository.changesets.count assert_equal 33, @repository.changes.count -- 2.39.5