diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-09-04 23:36:13 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-09-04 23:36:13 +0000 |
commit | 97487c4e1154696fb0b30ea8727ba5459f575719 (patch) | |
tree | 76e6e9d4521f32d995d123995b2e73e884645aae /activeresource/test/base | |
parent | 1d4d037b0d74fbc3c1cad1c192a6ea7278aff081 (diff) | |
download | rails-97487c4e1154696fb0b30ea8727ba5459f575719.tar.gz rails-97487c4e1154696fb0b30ea8727ba5459f575719.tar.bz2 rails-97487c4e1154696fb0b30ea8727ba5459f575719.zip |
load nil is noop. use new? instead of new_resource?
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5006 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activeresource/test/base')
-rw-r--r-- | activeresource/test/base/load_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activeresource/test/base/load_test.rb b/activeresource/test/base/load_test.rb index 674f8456f0..726e7100b7 100644 --- a/activeresource/test/base/load_test.rb +++ b/activeresource/test/base/load_test.rb @@ -14,6 +14,12 @@ class BaseLoadTest < Test::Unit::TestCase @person = Person.new end + def test_load_nil + assert_nothing_raised do + assert_equal @person, @person.load(nil) + end + end + def test_load_simple_hash assert_equal Hash.new, @person.attributes assert_equal @matz.stringify_keys, @person.load(@matz).attributes |