Rails3: scm: darcs: fix error of test_cat at unit model test

On Rails 3.1, ActiveRecord::HasManyThroughCantAssociateThroughHasOneOrManyReflection error raises.
For more details, see r7062.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7121 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-09-12 00:15:06 +00:00
parent 19219f704b
commit 8ebb5b61e8
1 changed files with 3 additions and 0 deletions

View File

@ -80,7 +80,10 @@ class RepositoryDarcsTest < ActiveSupport::TestCase
def test_cat def test_cat
if @repository.scm.supports_cat? if @repository.scm.supports_cat?
assert_equal 0, @repository.changesets.count
@repository.fetch_changesets @repository.fetch_changesets
@project.reload
assert_equal NUM_REV, @repository.changesets.count
cat = @repository.cat("sources/welcome_controller.rb", 2) cat = @repository.cat("sources/welcome_controller.rb", 2)
assert_not_nil cat assert_not_nil cat
assert cat.include?('class WelcomeController < ApplicationController') assert cat.include?('class WelcomeController < ApplicationController')