metasploit-framework/lib/rex/proto/http/client.rb.ut.rb

24 lines
463 B
Ruby
Raw Normal View History

#!/usr/bin/ruby
$:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..'))
require 'test/unit'
require 'rex/proto/http'
class Rex::Proto::Http::Client::UnitTest < Test::Unit::TestCase
Klass = Rex::Proto::Http::Client
def test_parse
c = Klass.new('www.google.com')
r = Rex::Proto::Http::Request::Get.new('/')
resp = c.send_request(r)
assert_equal(200, resp.code)
assert_equal('OK', resp.message)
assert_equal('1.0', resp.proto)
end
end