test_login_should_strip_whitescapes_from_user_name.diff

Marius BALTEANU, 2017-12-10 13:20

Download (677 Bytes)

View differences:

test/functional/account_controller_test.rb
220 220
    assert_response 302
221 221
  end
222 222

  
223
  def test_login_should_strip_whitespaces_from_user_name
224
    post :login, :params => {
225
        :username => ' jsmith ',
226
        :password => 'jsmith'
227
      }
228
    assert_response 302
229
    assert_equal 2, @request.session[:user_id]
230
  end
231

  
223 232
  def test_get_logout_should_not_logout
224 233
    @request.session[:user_id] = 2
225 234
    get :logout