Sha256: 656519bdd9e99c2d4af181df88ac8acfd79754043985865cd4a130747ad26e6a

Contents?: true

Size: 556 Bytes

Versions: 1

Compression:

Stored size: 556 Bytes

Contents

require 'helper'

class RequestEntityTest < Test::Unit::TestCase
  def test_post_request_body
    post = HTTP::Post.new("/body")
    post.body = "Here we are"

    result = @client.execute(post)
    assert_equal("Here we are", result)
  end

  def test_put_request_body
    post = HTTP::Put.new("/body")
    post.body = "We are there"

    result = @client.execute(post)
    assert_equal("We are there", result)
  end

  def setup
    @client = HTTP::Client.new(:default_host => "http://localhost:8080")
  end

  def teardown
    @client.shutdown
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jruby-httpclient-0.3.0-java test/http_client/test_request_entity.rb