File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
activerecord/test/cases/adapters/sqlite3 Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,14 @@ class SQLite3ExplainTest < ActiveRecord::SQLite3TestCase
10
10
def test_explain_for_one_query
11
11
explain = Author . where ( id : 1 ) . explain
12
12
assert_match %r(EXPLAIN for: SELECT "authors"\. \* FROM "authors" WHERE "authors"\. "id" = (?:\? \[ \[ "id", 1\] \] |1)) , explain
13
- assert_match ( /(SEARCH )?TABLE authors USING (INTEGER )?PRIMARY KEY/ , explain )
13
+ assert_match ( /(SEARCH )?( TABLE )? authors USING (INTEGER )?PRIMARY KEY/ , explain )
14
14
end
15
15
16
16
def test_explain_with_eager_loading
17
17
explain = Author . where ( id : 1 ) . includes ( :posts ) . explain
18
18
assert_match %r(EXPLAIN for: SELECT "authors"\. \* FROM "authors" WHERE "authors"\. "id" = (?:\? \[ \[ "id", 1\] \] |1)) , explain
19
- assert_match ( /(SEARCH )?TABLE authors USING (INTEGER )?PRIMARY KEY/ , explain )
19
+ assert_match ( /(SEARCH )?( TABLE )? authors USING (INTEGER )?PRIMARY KEY/ , explain )
20
20
assert_match %r(EXPLAIN for: SELECT "posts"\. \* FROM "posts" WHERE "posts"\. "author_id" = (?:\? \[ \[ "author_id", 1\] \] |1)) , explain
21
- assert_match ( /(SCAN )?TABLE posts/ , explain )
21
+ assert_match ( /(SEARCH |( SCAN )?( TABLE )) posts/ , explain )
22
22
end
23
23
end
You can’t perform that action at this time.
0 commit comments