Sha256: 27a06d73e51184879ed02e9d82e2343292e0630d6d6a706bc7ae7cdf202ba760

Contents?: true

Size: 747 Bytes

Versions: 10

Compression:

Stored size: 747 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe RubyPGExtras::DiagnosePrint do
  subject(:print_result) do
    RubyPGExtras::DiagnosePrint.call(data)
  end

  let(:data) do
    [
      {
        :check_name => :table_cache_hit,
        :ok => false,
        :message => "Table hit ratio too low: 0.906977."
      },
      {
        :check_name => :index_cache_hit,
        :ok => false,
        :message => "Index hit ratio is too low: 0.818182."
      },
      {
        :check_name => :ssl_used,
        :ok => true,
        :message => "Database client is using a secure SSL connection."
      }
    ]
  end

  describe "call" do
    it "works" do
      expect {
        print_result
      }.not_to raise_error
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ruby-pg-extras-3.3.0 spec/diagnose_print_spec.rb
ruby-pg-extras-3.2.7 spec/diagnose_print_spec.rb
ruby-pg-extras-3.2.6 spec/diagnose_print_spec.rb
ruby-pg-extras-3.2.5 spec/diagnose_print_spec.rb
ruby-pg-extras-3.2.4 spec/diagnose_print_spec.rb
ruby-pg-extras-3.2.3 spec/diagnose_print_spec.rb
ruby-pg-extras-3.2.2 spec/diagnose_print_spec.rb
ruby-pg-extras-3.2.1 spec/diagnose_print_spec.rb
ruby-pg-extras-3.2.0 spec/diagnose_print_spec.rb
ruby-pg-extras-3.1.0 spec/diagnose_print_spec.rb