Sha256: 43fde5d44a4febe6d98031cc23e5c940073719a955c0591221c6493e145486bc
Contents?: true
Size: 635 Bytes
Versions: 3
Compression:
Stored size: 635 Bytes
Contents
# frozen_string_literal: true require "test_helper" class RequestClassTest < Minitest::Test test "raises with invalid method" do error = assert_raises(Aitch::InvalidHTTPMethodError) { build_request(request_method: "invalid").request } 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.0.2 | test/aitch/request/request_class_test.rb |
aitch-1.0.1 | test/aitch/request/request_class_test.rb |
aitch-1.0.0 | test/aitch/request/request_class_test.rb |