From d9d5ae3d58d4a9fad94107fa29e30af96ec9891b Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Wed, 1 May 2013 21:35:03 -0300 Subject: [PATCH] Correct OrderedHash initialization to ensure keys order in 1.8.7 This should hopefully fix the build with 1.8.7 :pray: --- test/integration/http_authenticatable_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/http_authenticatable_test.rb b/test/integration/http_authenticatable_test.rb index b50a9a06c1..8f9a32b81e 100644 --- a/test/integration/http_authenticatable_test.rb +++ b/test/integration/http_authenticatable_test.rb @@ -63,7 +63,7 @@ class HttpAuthenticationTest < ActionDispatch::IntegrationTest end test 'it uses appropriate authentication_keys when configured with hash' do - swap Devise, :authentication_keys => ActiveSupport::OrderedHash.new.merge(:username => false, :email => false) do + swap Devise, :authentication_keys => ActiveSupport::OrderedHash[:username, false, :email, false] do sign_in_as_new_user_with_http("usertest") assert_response :success assert_match 'user@test.com', response.body @@ -72,7 +72,7 @@ class HttpAuthenticationTest < ActionDispatch::IntegrationTest end test 'it uses the appropriate key when configured explicitly' do - swap Devise, :authentication_keys => ActiveSupport::OrderedHash.new.merge(:email => false, :username => false), :http_authentication_key => :username do + swap Devise, :authentication_keys => ActiveSupport::OrderedHash[:email, false, :username, false], :http_authentication_key => :username do sign_in_as_new_user_with_http("usertest") assert_response :success assert_match 'user@test.com', response.body