Sha256: 3146717423813a9d40f65dffa7eeb13828c247eea6c885f95e28ef999f0d6c94

Contents?: true

Size: 392 Bytes

Versions: 1

Compression:

Stored size: 392 Bytes

Contents

require 'helper'

class BasicAuthTest < Test::Unit::TestCase
  def test_get_can_authenticate
    get = HTTP::Get.new("/protected")
    get.basic_auth("user", "Password")

    response = @client.execute(get)

    assert_equal("Logged In", response)
  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_basic_auth.rb