summaryrefslogtreecommitdiff
path: root/spec/ruby/library/net-http/httpgenericrequest/response_body_permitted_spec.rb
blob: 2f0751c344efa217fd941bde33fb598003be8943 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
require_relative '../../../spec_helper'
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