X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dbf35e0cf67ee330cd02c2431e0ed6d08681d184..2dfe6f3f2e911101f4e4e3b90a00e2ae97725d04:/test/controllers/sessions_controller_test.rb?ds=inline diff --git a/test/controllers/sessions_controller_test.rb b/test/controllers/sessions_controller_test.rb index a94a9a158..71d6de184 100644 --- a/test/controllers/sessions_controller_test.rb +++ b/test/controllers/sessions_controller_test.rb @@ -48,6 +48,14 @@ class SessionsControllerTest < ActionDispatch::IntegrationTest post login_path, :params => { :username => user.display_name, :password => "test" } assert_response :redirect assert_redirected_to root_path + + post login_path, :params => { :username => " #{user.display_name}", :password => "test" } + assert_response :redirect + assert_redirected_to root_path + + post login_path, :params => { :username => "#{user.display_name} ", :password => "test" } + assert_response :redirect + assert_redirected_to root_path end def test_logout_without_referer @@ -80,10 +88,7 @@ class SessionsControllerTest < ActionDispatch::IntegrationTest user = build(:user, :pending) post user_new_path, :params => { :user => user.attributes } post user_save_path, :params => { :read_ct => 1, :read_tou => 1 } - - assert_difference "User.find_by(:email => user.email).tokens.count", -1 do - post logout_path - end + post logout_path assert_response :redirect assert_redirected_to root_path end