Use :joins instead of :include.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9076 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-03-04 11:54:52 +00:00
parent 60b0a6c4b8
commit c30a6dffe0
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ class RepositoryTest < ActiveSupport::TestCase
def test_destroy
changesets = Changeset.count(:all, :conditions => "repository_id = 10")
changes = Change.count(:all, :conditions => "repository_id = 10",
:include => :changeset)
:joins => :changeset)
assert_difference 'Changeset.count', -changesets do
assert_difference 'Change.count', -changes do
Repository.find(10).destroy