diff options
author | Tobias Lütke <tobias.luetke@gmail.com> | 2007-08-09 19:22:04 +0000 |
---|---|---|
committer | Tobias Lütke <tobias.luetke@gmail.com> | 2007-08-09 19:22:04 +0000 |
commit | 18a4cc1bd2d260c6905b58dee61e7b3ac88f0a6b (patch) | |
tree | d1b048c408df044817bd31fa878fb09fab87507b /activeresource/test/connection_test.rb | |
parent | d4bf5e9b34d8d57be49ac50e31d6ad4151e43947 (diff) | |
download | rails-18a4cc1bd2d260c6905b58dee61e7b3ac88f0a6b.tar.gz rails-18a4cc1bd2d260c6905b58dee61e7b3ac88f0a6b.tar.bz2 rails-18a4cc1bd2d260c6905b58dee61e7b3ac88f0a6b.zip |
Raise ActiveResource::Redirection on 301,302 http code
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7297 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activeresource/test/connection_test.rb')
-rw-r--r-- | activeresource/test/connection_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activeresource/test/connection_test.rb b/activeresource/test/connection_test.rb index 24893f8cd3..68d57018bf 100644 --- a/activeresource/test/connection_test.rb +++ b/activeresource/test/connection_test.rb @@ -66,12 +66,12 @@ class ConnectionTest < Test::Unit::TestCase end end - ResponseHeaderStub = Struct.new(:code, 'Allow') + ResponseHeaderStub = Struct.new(:code, :message, 'Allow') def test_should_return_allowed_methods_for_method_no_allowed_exception begin - handle_response ResponseHeaderStub.new(405, "GET, POST") + handle_response ResponseHeaderStub.new(405, "HTTP Failed...", "GET, POST") rescue ActiveResource::MethodNotAllowed => e - assert_equal "Failed with 405", e.message + assert_equal "Failed with 405 HTTP Failed...", e.message assert_equal [:get, :post], e.allowed_methods end end |