Sha256: 36951406be172589ce383f9bd9cd81c5c0589b540dcddb14bcbb0c0f74bb354a
Contents?: true
Size: 522 Bytes
Versions: 11
Compression:
Stored size: 522 Bytes
Contents
require_relative "test_helper" class SuggestedIndexesTest < Minitest::Test def setup skip if ENV["TRAVIS_CI"] PgHero.reset_query_stats end def test_basic User.where(email: "person1@example.org").first assert_equal [{table: "users", columns: ["email"]}], PgHero.suggested_indexes.map { |q| q.except(:queries, :details) } end def test_existing_index User.where("updated_at > ?", Time.now).to_a assert_equal [], PgHero.suggested_indexes.map { |q| q.except(:queries, :details) } end end
Version data entries
11 entries across 11 versions & 1 rubygems