aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-03-13 19:56:12 -0400
committerGitHub <noreply@github.com>2017-03-13 19:56:12 -0400
commite2e63770f59ce4585944447ee237ec722761e77d (patch)
treebe527e3434eaefebc55cc4f4a8b02df7f942c870 /activerecord/test/cases
parent82aa2c124f4c2091ca4924735af466c22f0eebb4 (diff)
parent9d5217db5dce5e61cf3308329d94593a0e1cf6ff (diff)
downloadrails-e2e63770f59ce4585944447ee237ec722761e77d.tar.gz
rails-e2e63770f59ce4585944447ee237ec722761e77d.tar.bz2
rails-e2e63770f59ce4585944447ee237ec722761e77d.zip
Merge pull request #28068 from kamipo/refactor_data_sources
Extract `data_source_sql` to refactor data source statements
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb b/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
index fdd7b0157a..2179d1294c 100644
--- a/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
+++ b/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
@@ -260,8 +260,7 @@ module ActiveRecord
def test_tables_logs_name
sql = <<-SQL
- SELECT name FROM sqlite_master
- WHERE type = 'table' AND name <> 'sqlite_sequence'
+ SELECT name FROM sqlite_master WHERE name <> 'sqlite_sequence' AND type IN ('table')
SQL
assert_logged [[sql.squish, "SCHEMA", []]] do
@conn.tables
@@ -279,8 +278,7 @@ module ActiveRecord
def test_table_exists_logs_name
with_example_table do
sql = <<-SQL
- SELECT name FROM sqlite_master
- WHERE type = 'table' AND name <> 'sqlite_sequence' AND name = 'ex'
+ SELECT name FROM sqlite_master WHERE name <> 'sqlite_sequence' AND name = 'ex' AND type IN ('table')
SQL
assert_logged [[sql.squish, "SCHEMA", []]] do
assert @conn.table_exists?("ex")