diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-18 21:14:07 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-18 21:14:07 +0000 |
commit | f91acf0258b3d40cbb31663e965669b7199be051 (patch) | |
tree | a5a1caabd8c681b459360d92b7b62bf665c9a1eb /activeresource/test/authorization_test.rb | |
parent | 2bdac92dcf8caf9e2b45796f8af56da6a293d722 (diff) | |
download | rails-f91acf0258b3d40cbb31663e965669b7199be051.tar.gz rails-f91acf0258b3d40cbb31663e965669b7199be051.tar.bz2 rails-f91acf0258b3d40cbb31663e965669b7199be051.zip |
Ruby 1.9 compat: move from the deprecated Base64 module to ActiveSupport::Base64. Closes #10554.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activeresource/test/authorization_test.rb')
-rw-r--r-- | activeresource/test/authorization_test.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/activeresource/test/authorization_test.rb b/activeresource/test/authorization_test.rb index 58bd36cb77..aed2e0e64b 100644 --- a/activeresource/test/authorization_test.rb +++ b/activeresource/test/authorization_test.rb @@ -1,5 +1,4 @@ require "#{File.dirname(__FILE__)}/abstract_unit" -require 'base64' class AuthorizationTest < Test::Unit::TestCase Response = Struct.new(:code) @@ -25,7 +24,7 @@ class AuthorizationTest < Test::Unit::TestCase authorization = authorization_header["Authorization"].to_s.split assert_equal "Basic", authorization[0] - assert_equal ["david", "test123"], Base64.decode64(authorization[1]).split(":")[0..1] + assert_equal ["david", "test123"], ActiveSupport::Base64.decode64(authorization[1]).split(":")[0..1] end def test_authorization_header_with_username_but_no_password @@ -34,7 +33,7 @@ class AuthorizationTest < Test::Unit::TestCase authorization = authorization_header["Authorization"].to_s.split assert_equal "Basic", authorization[0] - assert_equal ["david"], Base64.decode64(authorization[1]).split(":")[0..1] + assert_equal ["david"], ActiveSupport::Base64.decode64(authorization[1]).split(":")[0..1] end def test_authorization_header_with_password_but_no_username @@ -43,7 +42,7 @@ class AuthorizationTest < Test::Unit::TestCase authorization = authorization_header["Authorization"].to_s.split assert_equal "Basic", authorization[0] - assert_equal ["", "test123"], Base64.decode64(authorization[1]).split(":")[0..1] + assert_equal ["", "test123"], ActiveSupport::Base64.decode64(authorization[1]).split(":")[0..1] end def test_get |