diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-06-22 18:15:40 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-06-22 18:15:40 +0000 |
commit | e682fee121ed4c48b94e0afea887370c16e15d05 (patch) | |
tree | 70f59e513f6db875055a9e5f537e5a7afb522fac /activeresource/test | |
parent | dae61089982d079d4ea57ad83340bf5cbdd83d3a (diff) | |
download | rails-e682fee121ed4c48b94e0afea887370c16e15d05.tar.gz rails-e682fee121ed4c48b94e0afea887370c16e15d05.tar.bz2 rails-e682fee121ed4c48b94e0afea887370c16e15d05.zip |
Fix reload error when path prefix is used. Closes #8727.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7082 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activeresource/test')
-rw-r--r-- | activeresource/test/base_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/activeresource/test/base_test.rb b/activeresource/test/base_test.rb index 328d3ae133..48b1045b61 100644 --- a/activeresource/test/base_test.rb +++ b/activeresource/test/base_test.rb @@ -293,6 +293,17 @@ class BaseTest < Test::Unit::TestCase ryan = Person.new(:id => 1, :name => 'Ryan', :address => address) assert_equal address.prefix_options, ryan.address.prefix_options end + + def test_reload_works_with_prefix_options + address = StreetAddress.find(1, :params => { :person_id => 1 }) + assert_equal address, address.reload + end + + def test_reload_works_without_prefix_options + person = Person.find(:first) + assert_equal person, person.reload + end + def test_create rick = Person.create(:name => 'Rick') |