mirror of
https://github.com/heartcombo/devise.git
synced 2026-04-28 03:00:29 -04:00
Use 'head :no_content' in sessions_controller#destroy
Code cleanup for returning headers instead of an empty string when destroying sessions. Lines 464 and 471 on test/integration/autenticatable_test.rb were adjusted to assert on :no_content
This commit is contained in:
@@ -461,14 +461,14 @@ class AuthenticationOthersTest < ActionController::IntegrationTest
|
||||
test 'sign out with xml format returns ok response' do
|
||||
sign_in_as_user
|
||||
get destroy_user_session_path(:format => 'xml')
|
||||
assert_response :ok
|
||||
assert_response :no_content
|
||||
assert_not warden.authenticated?(:user)
|
||||
end
|
||||
|
||||
test 'sign out with json format returns empty json response' do
|
||||
sign_in_as_user
|
||||
get destroy_user_session_path(:format => 'json')
|
||||
assert_response :ok
|
||||
assert_response :no_content
|
||||
assert_not warden.authenticated?(:user)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user