Sha256: 66b19554e6370d68b7181df46dc3bd243ea0f3df0663df846ff11ca301157009
Contents?: true
Size: 810 Bytes
Versions: 11
Compression:
Stored size: 810 Bytes
Contents
require_relative "test_helper" class BasicTest < Minitest::Test def setup City.delete_all end def test_explain City.create! PgHero.explain("ANALYZE DELETE FROM cities") assert_equal 1, City.count end def test_explain_multiple_statements City.create! assert_raises(ActiveRecord::StatementInvalid) { PgHero.explain("ANALYZE DELETE FROM cities; DELETE FROM cities; COMMIT") } end def test_analyze_tables assert PgHero.analyze_tables end def test_relation_sizes assert PgHero.relation_sizes end def test_transaction_id_danger assert PgHero.transaction_id_danger(threshold: 10000000000) end def test_autovacuum_danger assert PgHero.autovacuum_danger end def test_databases assert PgHero.databases[:primary].running_queries end end
Version data entries
11 entries across 11 versions & 1 rubygems