aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/associations/join_model_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-06-22 17:36:20 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-06-22 17:36:20 +0000
commitdae61089982d079d4ea57ad83340bf5cbdd83d3a (patch)
tree5ed20da186cb983ddceabce1718e95f8191be383 /activerecord/test/associations/join_model_test.rb
parent989332c734149a7f350a0dd7d483c820552c0267 (diff)
downloadrails-dae61089982d079d4ea57ad83340bf5cbdd83d3a.tar.gz
rails-dae61089982d079d4ea57ad83340bf5cbdd83d3a.tar.bz2
rails-dae61089982d079d4ea57ad83340bf5cbdd83d3a.zip
Update tests' use of fixtures for the new collections api. Closes #8726.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7081 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/associations/join_model_test.rb')
-rw-r--r--activerecord/test/associations/join_model_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/test/associations/join_model_test.rb b/activerecord/test/associations/join_model_test.rb
index a5e525c670..84078e6fff 100644
--- a/activerecord/test/associations/join_model_test.rb
+++ b/activerecord/test/associations/join_model_test.rb
@@ -294,20 +294,20 @@ class AssociationsJoinModelTest < Test::Unit::TestCase
def test_has_many_polymorphic
assert_raises ActiveRecord::HasManyThroughAssociationPolymorphicError do
- assert_equal [posts(:welcome), posts(:thinking)], tags(:general).taggables
+ assert_equal posts(:welcome, :thinking), tags(:general).taggables
end
assert_raises ActiveRecord::EagerLoadPolymorphicError do
- assert_equal [posts(:welcome), posts(:thinking)], tags(:general).taggings.find(:all, :include => :taggable)
+ assert_equal posts(:welcome, :thinking), tags(:general).taggings.find(:all, :include => :taggable)
end
end
def test_has_many_polymorphic_with_source_type
- assert_equal [posts(:welcome), posts(:thinking)], tags(:general).tagged_posts
+ assert_equal posts(:welcome, :thinking), tags(:general).tagged_posts
end
def test_eager_has_many_polymorphic_with_source_type
tag_with_include = Tag.find(tags(:general).id, :include => :tagged_posts)
- desired = [posts(:welcome), posts(:thinking)]
+ desired = posts(:welcome, :thinking)
assert_no_queries do
assert_equal desired, tag_with_include.tagged_posts
end
@@ -339,12 +339,12 @@ class AssociationsJoinModelTest < Test::Unit::TestCase
end
def test_has_many_through_polymorphic_has_many
- assert_equal [taggings(:welcome_general), taggings(:thinking_general)], authors(:david).taggings.uniq.sort_by { |t| t.id }
+ assert_equal taggings(:welcome_general, :thinking_general), authors(:david).taggings.uniq.sort_by { |t| t.id }
end
def test_include_has_many_through_polymorphic_has_many
author = Author.find_by_id(authors(:david).id, :include => :taggings)
- expected_taggings = [taggings(:welcome_general), taggings(:thinking_general)]
+ expected_taggings = taggings(:welcome_general, :thinking_general)
assert_no_queries do
assert_equal expected_taggings, author.taggings.uniq.sort_by { |t| t.id }
end