summaryrefslogtreecommitdiffstats
path: root/test/unit/repository_mercurial_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-09-11 23:09:38 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-09-11 23:09:38 +0000
commit264deedd82e63750c154114e0d2ab318909f141a (patch)
tree28b95d3a0794a6aa8bd8f2ef258a93014ba44dfe /test/unit/repository_mercurial_test.rb
parent0130f6265115f14dae8907c6d4d8b6c66275911e (diff)
downloadredmine-264deedd82e63750c154114e0d2ab318909f141a.tar.gz
redmine-264deedd82e63750c154114e0d2ab318909f141a.zip
Rails3: scm: mercurial: fix error of test_find_changeset_by_empty_name 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@7102 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_mercurial_test.rb')
-rw-r--r--test/unit/repository_mercurial_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/repository_mercurial_test.rb b/test/unit/repository_mercurial_test.rb
index 4a68356de..d8dd55548 100644
--- a/test/unit/repository_mercurial_test.rb
+++ b/test/unit/repository_mercurial_test.rb
@@ -235,8 +235,10 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
end
def test_find_changeset_by_empty_name
+ assert_equal 0, @repository.changesets.count
@repository.fetch_changesets
- @repository.reload
+ @project.reload
+ assert_equal NUM_REV, @repository.changesets.count
['', ' ', nil].each do |r|
assert_nil @repository.find_changeset_by_name(r)
end