From 786342e17f42799ef889cf6127fe97e9598272e0 Mon Sep 17 00:00:00 2001 From: David Trasbo Date: Wed, 30 Jun 2010 21:33:49 +0200 Subject: Return from ActiveRecord::Base#attributes= unless value is a hash [#4070 state:committed] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- activerecord/test/cases/base_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'activerecord/test') diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index 09bdd13cd4..a4cf5120e1 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -61,6 +61,13 @@ class BasicsTest < ActiveRecord::TestCase assert_equal(topics(:first).author_email_address, Topic.find(1).author_email_address) end + def test_set_attributes_without_hash + topic = Topic.new + assert_nothing_raised do + topic.attributes = '' + end + end + def test_integers_as_nil test = AutoId.create('value' => '') assert_nil AutoId.find(test.id).value -- cgit v1.2.3