Skip to content

Commit

Permalink
Correct OrderedHash initialization to ensure keys order in 1.8.7
Browse files Browse the repository at this point in the history
This should hopefully fix the build with 1.8.7 🙏
  • Loading branch information
carlosantoniodasilva committed May 2, 2013
1 parent b51c7fe commit d9d5ae3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/integration/http_authenticatable_test.rb
Expand Up @@ -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 '<email>user@test.com</email>', response.body
Expand All @@ -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 '<email>user@test.com</email>', response.body
Expand Down

0 comments on commit d9d5ae3

Please sign in to comment.