summaryrefslogtreecommitdiffstats
path: root/test/unit/repository_git_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-09-06 13:57:49 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-09-06 13:57:49 +0000
commit9cc83b425ba7643c7f92dafd5c95ae7d71e31cb5 (patch)
tree3a103c1d5f86629c61aa1ff0d72fcd500156e6d3 /test/unit/repository_git_test.rb
parent1b9bb1ad0bf8c63170a169ed9da2ec3122dfab13 (diff)
downloadredmine-9cc83b425ba7643c7f92dafd5c95ae7d71e31cb5.tar.gz
redmine-9cc83b425ba7643c7f92dafd5c95ae7d71e31cb5.zip
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
Diffstat (limited to 'test/unit/repository_git_test.rb')
-rw-r--r--test/unit/repository_git_test.rb3
1 files changed, 2 insertions, 1 deletions
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