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:
parent
60b0a6c4b8
commit
c30a6dffe0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue