Sha256: 8c4f5ebef7547651d77527fbcb13e8c34b2fe21b2f0bc41e1736dca70723228a

Contents?: true

Size: 469 Bytes

Versions: 3

Compression:

Stored size: 469 Bytes

Contents

require 'net/http'
require File.expand_path('../fixtures/http_server', __FILE__)

describe "Net::HTTP.post_form when passed URI" do
  before(:all) do
    NetHTTPSpecs.start_server
  end

  after(:all) do
    NetHTTPSpecs.stop_server
  end

  it "POSTs the passed form data to the given uri" do
    uri = URI.parse('http://localhost:3333/request/body')
    data = { :test => :data }

    res = Net::HTTP.post_form(uri, data)
    res.body.should == "test=data"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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