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
This commit is contained in:
parent
1b9bb1ad0b
commit
9cc83b425b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue