Sha256: 83527ceac79dc3191d00e2195717cd5f75300adeaaf0603db82e971a4f886ee1
Contents?: true
Size: 639 Bytes
Versions: 3
Compression:
Stored size: 639 Bytes
Contents
# frozen_string_literal: true require "test_helper" class RequestClassTest < Minitest::Test test "raises with invalid method" do error = assert_raises(Aitch::InvalidHTTPMethodError) do build_request(request_method: "invalid").request end assert_equal %[unexpected HTTP verb: "invalid"], error.message end %w[ get post put patch delete head options trace ].each do |method| test "instantiates #{method.upcase} method" do request = build_request(request_method: method).request assert_equal "Net::HTTP::#{method.capitalize}", request.class.name end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
aitch-1.2.1 | test/aitch/request/request_class_test.rb |
aitch-1.2.0 | test/aitch/request/request_class_test.rb |
aitch-1.1.0 | test/aitch/request/request_class_test.rb |