mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Don't test PostgreSQL implementation details
Asserting that the message contains "QUERY PLAN" is enough for the adapter's test. The plan may vary according to number of tuples etc. but that's out of our concern.
This commit is contained in:
parent
42d5e785fe
commit
7447e0b994
1 changed files with 0 additions and 3 deletions
|
@ -11,16 +11,13 @@ module ActiveRecord
|
|||
explain = Developer.where(:id => 1).explain
|
||||
assert_match %(EXPLAIN for: SELECT "developers".* FROM "developers" WHERE "developers"."id" = $1), explain
|
||||
assert_match %(QUERY PLAN), explain
|
||||
assert_match %(Index Scan using developers_pkey on developers), explain
|
||||
end
|
||||
|
||||
def test_explain_with_eager_loading
|
||||
explain = Developer.where(:id => 1).includes(:audit_logs).explain
|
||||
assert_match %(QUERY PLAN), explain
|
||||
assert_match %(EXPLAIN for: SELECT "developers".* FROM "developers" WHERE "developers"."id" = $1), explain
|
||||
assert_match %(Index Scan using developers_pkey on developers), explain
|
||||
assert_match %(EXPLAIN for: SELECT "audit_logs".* FROM "audit_logs" WHERE "audit_logs"."developer_id" IN (1)), explain
|
||||
assert_match %(Seq Scan on audit_logs), explain
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue