]> source.dussan.org Git - redmine.git/commitdiff
Rails3: scm: filesystem: replace @repository.reload to @project.reload of test_fetch_...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 12 Sep 2011 10:03:09 +0000 (10:03 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 12 Sep 2011 10:03:09 +0000 (10:03 +0000)
Filesystem repository does not have revisions.
So, on Rails 3.1, ActiveRecord::HasManyThroughCantAssociateThroughHasOneOrManyReflection error
does not raise.
But, replace the same way with other SCMs.

For more details, see r7062.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7164 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/repository_filesystem_test.rb

index 613ccdaa5ae0ec008066195f25e614c1607bfc87..3579d76085acea619d295bd56d469c2fa909333d 100644 (file)
@@ -34,8 +34,10 @@ class RepositoryFilesystemTest < ActiveSupport::TestCase
 
   if File.directory?(REPOSITORY_PATH)
     def test_fetch_changesets
+      assert_equal 0, @repository.changesets.count
+      assert_equal 0, @repository.changes.count
       @repository.fetch_changesets
-      @repository.reload
+      @project.reload
       assert_equal 0, @repository.changesets.count
       assert_equal 0, @repository.changes.count
     end