1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Removed duplicated tests [#3026 state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
This commit is contained in:
Arthur Zapparoli 2009-08-09 16:19:23 -03:00 committed by Pratik Naik
parent ce2422ceaf
commit 810b59a2a9

View file

@ -249,24 +249,6 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase
assert_equal 1, Topic.find(topic.id)[:replies_count]
end
def test_belongs_to_counter_after_save
topic = Topic.create("title" => "monday night")
topic.replies.create("title" => "re: monday night", "content" => "football")
assert_equal 1, Topic.find(topic.id).send(:read_attribute, "replies_count")
topic.save
assert_equal 1, Topic.find(topic.id).send(:read_attribute, "replies_count")
end
def test_belongs_to_counter_after_update_attributes
topic = Topic.create("title" => "37s")
topic.replies.create("title" => "re: 37s", "content" => "rails")
assert_equal 1, Topic.find(topic.id).send(:read_attribute, "replies_count")
topic.update_attributes("title" => "37signals")
assert_equal 1, Topic.find(topic.id).send(:read_attribute, "replies_count")
end
def test_assignment_before_child_saved
final_cut = Client.new("name" => "Final Cut")
firm = Firm.find(1)