mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-10 08:08:00 -05:00
fix OrderedHash initialization
This commit is contained in:
@@ -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({ :username => false, :email => false }) do
|
||||
swap Devise, :authentication_keys => ActiveSupport::OrderedHash.new.merge(: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
|
||||
@@ -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({ :email => false, :username => false }), :http_authentication_key => :username do
|
||||
swap Devise, :authentication_keys => ActiveSupport::OrderedHash.new.merge(: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
|
||||
|
||||
Reference in New Issue
Block a user