mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fixing more test warnings in 1.9.3
This commit is contained in:
parent
9274a5744b
commit
a0656989c4
3 changed files with 6 additions and 6 deletions
|
@ -576,9 +576,9 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_polymorphic_counter_cache
|
def test_polymorphic_counter_cache
|
||||||
tagging = taggings(:welcome_general)
|
tagging = taggings(:welcome_general)
|
||||||
post = posts(:welcome)
|
post = post = posts(:welcome)
|
||||||
comment = comments(:greetings)
|
comment = comments(:greetings)
|
||||||
|
|
||||||
assert_difference 'post.reload.taggings_count', -1 do
|
assert_difference 'post.reload.taggings_count', -1 do
|
||||||
assert_difference 'comment.reload.taggings_count', +1 do
|
assert_difference 'comment.reload.taggings_count', +1 do
|
||||||
|
|
|
@ -173,7 +173,7 @@ class EagerAssociationTest < ActiveRecord::TestCase
|
||||||
|
|
||||||
def test_associations_loaded_for_all_records
|
def test_associations_loaded_for_all_records
|
||||||
post = Post.create!(:title => 'foo', :body => "I like cars!")
|
post = Post.create!(:title => 'foo', :body => "I like cars!")
|
||||||
comment = SpecialComment.create!(:body => 'Come on!', :post => post)
|
SpecialComment.create!(:body => 'Come on!', :post => post)
|
||||||
first_category = Category.create! :name => 'First!', :posts => [post]
|
first_category = Category.create! :name => 'First!', :posts => [post]
|
||||||
second_category = Category.create! :name => 'Second!', :posts => [post]
|
second_category = Category.create! :name => 'Second!', :posts => [post]
|
||||||
|
|
||||||
|
|
|
@ -760,7 +760,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase
|
||||||
def test_primary_key_option_on_source
|
def test_primary_key_option_on_source
|
||||||
post = posts(:welcome)
|
post = posts(:welcome)
|
||||||
category = categories(:general)
|
category = categories(:general)
|
||||||
categorization = Categorization.create!(:post_id => post.id, :named_category_name => category.name)
|
Categorization.create!(:post_id => post.id, :named_category_name => category.name)
|
||||||
|
|
||||||
assert_equal [category], post.named_categories
|
assert_equal [category], post.named_categories
|
||||||
assert_equal [category.name], post.named_category_ids # checks when target loaded
|
assert_equal [category.name], post.named_category_ids # checks when target loaded
|
||||||
|
|
Loading…
Reference in a new issue