summaryrefslogtreecommitdiff
path: root/test/webrick/test_httpstatus.rb
blob: fd0570d5c663a7c15f22725e72ba70b162ae5c0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# frozen_string_literal: false
require "test/unit"
require "webrick"

class TestWEBrickHTTPStatus < Test::Unit::TestCase
  def test_info?
    assert WEBrick::HTTPStatus.info?(100)
    refute WEBrick::HTTPStatus.info?(200)
  end

  def test_success?
    assert WEBrick::HTTPStatus.success?(200)
    refute WEBrick::HTTPStatus.success?(300)
  end

  def test_redirect?
    assert WEBrick::HTTPStatus.redirect?(300)
    refute WEBrick::HTTPStatus.redirect?(400)
  end

  def test_error?
    assert WEBrick::HTTPStatus.error?(400)
    refute WEBrick::HTTPStatus.error?(600)
  end

  def test_client_error?
    assert WEBrick::HTTPStatus.client_error?(400)
    refute WEBrick::HTTPStatus.client_error?(500)
  end

  def test_server_error?
    assert WEBrick::HTTPStatus.server_error?(500)
    refute WEBrick::HTTPStatus.server_error?(600)
  end
end
4:28 +0900'>2022-09-23Bindgen immediate types with builtinTakashi Kokubun 2022-09-23Drop c_64 and c_32Takashi Kokubun 2022-09-23Bindgen enum with builtinTakashi Kokubun 2022-09-23Builtin needs to be baseruby-compatibleTakashi Kokubun 2022-09-23Automatically setup bundler of bindgen.rbTakashi Kokubun 2022-09-23mjit_c.rb doesn't need to be an erbTakashi Kokubun 2022-09-23Mix manual and auto-generated C APIsTakashi Kokubun 2022-09-23Bindgen macro with builtinTakashi Kokubun 2022-09-23Auto-generate mjit_c.rb.erbTakashi Kokubun 2022-09-23Builtin RubyVM::MJIT::CTakashi Kokubun 2022-09-21add rb_execution_contextAaron Patterson 2022-09-21add rb_control_frame_tAaron Patterson 2022-09-09More robust macro parser (#6343)Aaron Patterson 2022-09-05Add mjit-bindgen workflow (#6327)Takashi Kokubun 2022-09-04Ruby MJIT (#6028)Takashi Kokubun