Sha256: add21eb308d8bef2ebf29d65ae58efe170933a30b0e8b3f9f796580447845d31

Contents?: true

Size: 891 Bytes

Versions: 1

Compression:

Stored size: 891 Bytes

Contents

require 'helper'

class TestStatus < Test::Unit::TestCase

  context "ntail" do

    should "correctly identify the nginx 499 status code" do
      status = NginxTail::Status::NGINX_MAGIC_STATUS # 499
      # directly via the helper function
      assert !NginxTail::LogLine.information_status?(status)
      assert !NginxTail::LogLine.success_status?(status)
      assert !NginxTail::LogLine.redirect_status?(status)
      assert !NginxTail::LogLine.client_error_status?(status)
      assert !NginxTail::LogLine.server_error_status?(status)
      # parsed from a raw log line
      log_line = random_log_line(:status => NginxTail::Status::NGINX_MAGIC_STATUS)
      assert !log_line.information_status?
      assert !log_line.success_status?
      assert !log_line.redirect_status?
      assert !log_line.client_error_status?
      assert !log_line.server_error_status?
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ntail-1.3.2 test/ntail/test_status.rb