aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/has_many_through_associations_test.rb
diff options
context:
space:
mode:
authormiloops <miloops@gmail.com>2008-07-31 10:57:50 -0300
committerPratik Naik <pratiknaik@gmail.com>2008-07-31 17:01:22 +0100
commitfb5cc19707582fa61ca3e426697cc2b00e9e5ffa (patch)
tree12389f03c900a0bd1ee8204ae05067618ffe9161 /activerecord/test/cases/associations/has_many_through_associations_test.rb
parent108db00aa90fe266564483ab301cf0669cae600f (diff)
downloadrails-fb5cc19707582fa61ca3e426697cc2b00e9e5ffa.tar.gz
rails-fb5cc19707582fa61ca3e426697cc2b00e9e5ffa.tar.bz2
rails-fb5cc19707582fa61ca3e426697cc2b00e9e5ffa.zip
Fix HasManyThroughAssociationsTest tests. [#733 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/test/cases/associations/has_many_through_associations_test.rb')
-rw-r--r--activerecord/test/cases/associations/has_many_through_associations_test.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb
index be5170f830..d51a3c7e1c 100644
--- a/activerecord/test/cases/associations/has_many_through_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb
@@ -2,15 +2,18 @@ require "cases/helper"
require 'models/post'
require 'models/person'
require 'models/reader'
+require 'models/comment'
class HasManyThroughAssociationsTest < ActiveRecord::TestCase
- fixtures :posts, :readers, :people
+ fixtures :posts, :readers, :people, :comments
def test_associate_existing
assert_queries(2) { posts(:thinking);people(:david) }
-
+
+ posts(:thinking).people
+
assert_queries(1) do
- posts(:thinking).people << people(:david)
+ posts(:thinking).people << people(:david)
end
assert_queries(1) do