require_relative '../../../spec_helper'
require 'net/http'

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

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