Sha256: 95653ea49fe584529d3331d0c18929b7d7e50172640ef88ca2ada02878d5d0b5

Contents?: true

Size: 424 Bytes

Versions: 1

Compression:

Stored size: 424 Bytes

Contents

require_relative "test_helper"

class SuggestedIndexesTest < Minitest::Test
  def setup
    PgHero.reset_query_stats
  end

  def test_basic
    User.where(email: "person1@example.org").first
    # User.where(email: "person1@example.org", city_id: 1).first
    # User.where(city_id: 1).to_a
    assert_equal [{table: "users", columns: ["email"]}], PgHero.suggested_indexes.map { |q| q.except(:queries, :details) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pghero-1.2.2 test/suggested_indexes_test.rb