diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2018-02-22 06:15:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-22 06:15:11 +0000 |
commit | a5e81342af6b71c7247ec3caf4e68d1baa4e465a (patch) | |
tree | 386b110313b30ab3adc8d9c5b6560e1122f5ba08 /actionpack | |
parent | 651c2492f079cc2e37bf8e93a9fd23bde1e5349e (diff) | |
parent | 6f6fe69ea8d2072c49ab7d56b32f19ea27805962 (diff) | |
download | rails-a5e81342af6b71c7247ec3caf4e68d1baa4e465a.tar.gz rails-a5e81342af6b71c7247ec3caf4e68d1baa4e465a.tar.bz2 rails-a5e81342af6b71c7247ec3caf4e68d1baa4e465a.zip |
Merge pull request #32076 from utilum/use_dot
Call methods with .method_name not ::method_name
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/controller/http_digest_authentication_test.rb | 9 | ||||
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/actionpack/test/controller/http_digest_authentication_test.rb b/actionpack/test/controller/http_digest_authentication_test.rb index 76ff784926..560157dc61 100644 --- a/actionpack/test/controller/http_digest_authentication_test.rb +++ b/actionpack/test/controller/http_digest_authentication_test.rb @@ -9,7 +9,7 @@ class HttpDigestAuthenticationTest < ActionController::TestCase before_action :authenticate_with_request, only: :display USERS = { "lifo" => "world", "pretty" => "please", - "dhh" => ::Digest::MD5::hexdigest(["dhh", "SuperSecret", "secret"].join(":")) } + "dhh" => ::Digest::MD5.hexdigest(["dhh", "SuperSecret", "secret"].join(":")) } def index render plain: "Hello Secret" @@ -181,9 +181,10 @@ class HttpDigestAuthenticationTest < ActionController::TestCase end test "authentication request with password stored as ha1 digest hash" do - @request.env["HTTP_AUTHORIZATION"] = encode_credentials(username: "dhh", - password: ::Digest::MD5::hexdigest(["dhh", "SuperSecret", "secret"].join(":")), - password_is_ha1: true) + @request.env["HTTP_AUTHORIZATION"] = encode_credentials( + username: "dhh", + password: ::Digest::MD5.hexdigest(["dhh", "SuperSecret", "secret"].join(":")), + password_is_ha1: true) get :display assert_response :success diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index ec939e946a..9c0e101f7c 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -676,7 +676,7 @@ class LegacyRouteSetTests < ActiveSupport::TestCase token = "\321\202\320\265\320\272\321\201\321\202".dup # 'text' in Russian token.force_encoding(Encoding::BINARY) - escaped_token = CGI::escape(token) + escaped_token = CGI.escape(token) assert_equal "/page/" + escaped_token, url_for(rs, controller: "content", action: "show_page", id: token) assert_equal({ controller: "content", action: "show_page", id: token }, rs.recognize_path("/page/#{escaped_token}")) |