aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/library/net/http/httpgenericrequest/request_body_permitted_spec.rb
blob: 1e0b3ab028fb7ba8dd7902b8fd4c9f59f50275e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
require File.expand_path('../../../../../spec_helper', __FILE__)
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 be_true

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