Sha256: f153dcbbe5d29cd09c5502cb25896d0beece1f5ea7a9c98145432590eeaba596

Contents?: true

Size: 420 Bytes

Versions: 3

Compression:

Stored size: 420 Bytes

Contents

require 'net/http'

describe "Net::HTTPGenericRequest#response_body_permitted?" do
  it "returns true when the response is expected to have a body" do
    request = Net::HTTPGenericRequest.new("POST", true, true, "/some/path")
    request.response_body_permitted?.should be_true

    request = Net::HTTPGenericRequest.new("POST", true, false, "/some/path")
    request.response_body_permitted?.should be_false
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubysl-net-http-1.0.1 spec/httpgenericrequest/response_body_permitted_spec.rb
rubysl-net-http-2.0.4 spec/httpgenericrequest/response_body_permitted_spec.rb
rubysl-net-http-1.0.0 spec/httpgenericrequest/response_body_permitted_spec.rb