mirror of
https://github.com/heartcombo/devise.git
synced 2026-04-28 03:00:29 -04:00
failure_app now properly handles nil request.format
This commit is contained in:
@@ -77,6 +77,11 @@ class FailureTest < ActiveSupport::TestCase
|
||||
assert_equal 401, @response.first
|
||||
end
|
||||
|
||||
test 'return 401 status for unknown formats' do
|
||||
call_failure 'formats' => []
|
||||
assert_equal 401, @response.first
|
||||
end
|
||||
|
||||
test 'return WWW-authenticate headers if model allows' do
|
||||
call_failure('formats' => :xml)
|
||||
assert_equal 'Basic realm="Application"', @response.second["WWW-Authenticate"]
|
||||
|
||||
Reference in New Issue
Block a user