diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-10-30 12:47:23 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-10-30 12:47:23 +0100 |
commit | dffc2e2b64c89fdb0303bd18eccc7351ed0a0a58 (patch) | |
tree | 71b9429a420c6c8dbb272e4a1236ede773c46b67 /activeresource/test | |
parent | ea2545fd8dfcaafcf6eff58c0afe57c55e2c6317 (diff) | |
download | rails-dffc2e2b64c89fdb0303bd18eccc7351ed0a0a58.tar.gz rails-dffc2e2b64c89fdb0303bd18eccc7351ed0a0a58.tar.bz2 rails-dffc2e2b64c89fdb0303bd18eccc7351ed0a0a58.zip |
Fixed that ActiveResource#post would post an empty string when it shouldn't be posting anything (Paolo Angelini) [#525 state:committed]
Diffstat (limited to 'activeresource/test')
-rw-r--r-- | activeresource/test/base/custom_methods_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activeresource/test/base/custom_methods_test.rb b/activeresource/test/base/custom_methods_test.rb index ba5799edfb..61887f4ec7 100644 --- a/activeresource/test/base/custom_methods_test.rb +++ b/activeresource/test/base/custom_methods_test.rb @@ -81,6 +81,8 @@ class CustomMethodsTest < Test::Unit::TestCase # Test POST against a new element URL ryan = Person.new(:name => 'Ryan') assert_equal ActiveResource::Response.new(@ryan, 201, {'Location' => '/people/5.xml'}), ryan.post(:register) + expected_request = ActiveResource::Request.new(:post, '/people/new/register.xml', @ryan) + assert_equal expected_request.body, ActiveResource::HttpMock.requests.first.body # Test POST against a nested collection URL addy = StreetAddress.new(:street => '123 Test Dr.', :person_id => 1) |