# Sprawd, czy strona logowania dziaa i zawiera odpowiednie pola
def test_login_page
  get :login
  title = assigns(:title)
  assert_equal "Logowanie do RailsSpace", title
  assert_response :success
  assert_template "login"
  assert_tag "form", :attributes => { :action => "/user/login",
                     :method => "post" }
  assert_tag "input",
             :attributes => { :name => "user[screen_name]",
             :type => "text",
             :size => User::SCREEN_NAME_SIZE,
             :maxlength => User::SCREEN_NAME_MAX_LENGTH }
  assert_tag "input",
             :attributes => { :name => "user[password]",
             :type => "password",
             :size => User::PASSWORD_SIZE,
             :maxlength => User::PASSWORD_MAX_LENGTH }
  assert_tag "input", :attributes => { :type => "submit",
                      :value => "Zaloguj!" }
end

