aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/test/base_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource/test/base_test.rb')
-rw-r--r--activeresource/test/base_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activeresource/test/base_test.rb b/activeresource/test/base_test.rb
index 4d3bb7461e..15e9609034 100644
--- a/activeresource/test/base_test.rb
+++ b/activeresource/test/base_test.rb
@@ -217,6 +217,13 @@ class BaseTest < Test::Unit::TestCase
assert_equal '5', matzs_house.id
end
+ # Test that loading a resource preserves its prefix_options.
+ def test_load_preserves_prefix_options
+ address = StreetAddress.find(1, :person_id => 1)
+ ryan = Person.new(:id => 1, :name => 'Ryan', :address => address)
+ assert_equal address.prefix_options, ryan.address.prefix_options
+ end
+
def test_create
rick = Person.create(:name => 'Rick')
assert rick.valid?