fix OrderedHash initialization

This commit is contained in:
Vasiliy Ermolovich
2013-04-23 10:37:10 +03:00
parent fae8e977e8
commit dceb788c6b

View File

@@ -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