mirror of
https://github.com/heartcombo/devise.git
synced 2026-04-28 03:00:29 -04:00
fix for issues #999: HTTP_ACCEPT=*/* should redirect to the default location
This commit is contained in:
committed by
José Valim
parent
39b59142ea
commit
6153a52e2d
@@ -39,6 +39,11 @@ class FailureTest < ActiveSupport::TestCase
|
||||
assert_equal 'http://test.host/users/sign_in', @response.second['Location']
|
||||
end
|
||||
|
||||
test 'return to the default redirect location for wildcard requests' do
|
||||
call_failure 'action_dispatch.request.formats' => nil, 'HTTP_ACCEPT' => '*/*'
|
||||
assert_equal 'http://test.host/users/sign_in', @response.second['Location']
|
||||
end
|
||||
|
||||
test 'uses the proxy failure message as symbol' do
|
||||
call_failure('warden' => OpenStruct.new(:message => :test))
|
||||
assert_equal 'test', @request.flash[:alert]
|
||||
|
||||
Reference in New Issue
Block a user