diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-07-20 12:58:42 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-20 12:58:42 -0300 |
commit | f88495d519f9bdacd542d61b4e8117eb4f79c173 (patch) | |
tree | 9af8ea802786a3e8f92a554bed78b1abbad6fae0 /activerecord/test/cases/adapters/sqlite3 | |
parent | b1d48d542452e5d87b42a8af513b7102d92b0684 (diff) | |
parent | 7d1dc9841cfce02b32a1a9373e1e8c08cb801269 (diff) | |
download | rails-f88495d519f9bdacd542d61b4e8117eb4f79c173.tar.gz rails-f88495d519f9bdacd542d61b4e8117eb4f79c173.tar.bz2 rails-f88495d519f9bdacd542d61b4e8117eb4f79c173.zip |
Merge pull request #25885 from kamipo/fix_explain_logging_with_binds
Fix explain logging with binds
Diffstat (limited to 'activerecord/test/cases/adapters/sqlite3')
-rw-r--r-- | activerecord/test/cases/adapters/sqlite3/explain_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/adapters/sqlite3/explain_test.rb b/activerecord/test/cases/adapters/sqlite3/explain_test.rb index a1a6e5f16a..4d25bd615d 100644 --- a/activerecord/test/cases/adapters/sqlite3/explain_test.rb +++ b/activerecord/test/cases/adapters/sqlite3/explain_test.rb @@ -7,13 +7,13 @@ class SQLite3ExplainTest < ActiveRecord::SQLite3TestCase def test_explain_for_one_query explain = Developer.where(id: 1).explain - assert_match %r(EXPLAIN for: SELECT "developers".* FROM "developers" WHERE "developers"."id" = (?:\?|1)), explain + assert_match %r(EXPLAIN for: SELECT "developers".* FROM "developers" WHERE "developers"."id" = (?:\? \[\["id", 1\]\]|1)), explain assert_match(/(SEARCH )?TABLE developers USING (INTEGER )?PRIMARY KEY/, explain) end def test_explain_with_eager_loading explain = Developer.where(id: 1).includes(:audit_logs).explain - assert_match %r(EXPLAIN for: SELECT "developers".* FROM "developers" WHERE "developers"."id" = (?:\?|1)), explain + assert_match %r(EXPLAIN for: SELECT "developers".* FROM "developers" WHERE "developers"."id" = (?:\? \[\["id", 1\]\]|1)), explain assert_match(/(SEARCH )?TABLE developers USING (INTEGER )?PRIMARY KEY/, explain) assert_match %(EXPLAIN for: SELECT "audit_logs".* FROM "audit_logs" WHERE "audit_logs"."developer_id" = 1), explain assert_match(/(SCAN )?TABLE audit_logs/, explain) |