Sha256: fb79df295c08c7802dbaece1a49aada394b27d2e7fe14ecd1ed82a34a9820f9a
Contents?: true
Size: 1.23 KB
Versions: 13
Compression:
Stored size: 1.23 KB
Contents
require 'helper' class TestHttpVersion < Test::Unit::TestCase context "ntail" do should "correctly identify the HTTP version of the request" do http_version = "HTTP/1.0" # directly via the helper function assert_equal http_version, NginxTail::LogLine.to_http_version_s(http_version) # parsed from a raw log line log_line = random_log_line(:http_version => http_version) assert_equal http_version, log_line.to_http_version_s end should "correctly identify the major HTTP version" do http_version = "HTTP/1.0" # directly via the helper function assert_equal "1", NginxTail::LogLine.to_http_version_s(http_version, :major) # parsed from a raw log line log_line = random_log_line(:http_version => http_version) assert_equal "1", log_line.to_http_version_s(:major) end should "correctly identify the minor HTTP version" do http_version = "HTTP/1.0" # directly via the helper function assert_equal "1", NginxTail::LogLine.to_http_version_s(http_version, :minor) # parsed from a raw log line log_line = random_log_line(:http_version => http_version) assert_equal "1", log_line.to_http_version_s(:minor) end end end
Version data entries
13 entries across 13 versions & 1 rubygems