diff options
author | Girish S <girish.sonawane@gmail.com> | 2014-02-14 15:32:10 +0530 |
---|---|---|
committer | Girish S <girish.sonawane@gmail.com> | 2014-02-14 15:32:10 +0530 |
commit | bbf6df78a42345eb5343337372fb8602b736222e (patch) | |
tree | 5bb9036f758cbae5665186996f7af03a17dade13 /activerecord/test/cases | |
parent | 7d897abeccb8533d770ac1d0768eca20ec2f3971 (diff) | |
download | rails-bbf6df78a42345eb5343337372fb8602b736222e.tar.gz rails-bbf6df78a42345eb5343337372fb8602b736222e.tar.bz2 rails-bbf6df78a42345eb5343337372fb8602b736222e.zip |
SQLite3Adapter now checks for views in table_exists? fixes: 14041
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb b/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb index 02834edf7b..fc5c1ef859 100644 --- a/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb +++ b/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb @@ -276,6 +276,16 @@ module ActiveRecord assert_equal 0, @conn.select_rows(count_sql).first.first end + def test_views + assert_equal %w{ items }, @conn.tables + + @conn.execute <<-eosql + CREATE VIEW items_view AS + select id from items; + eosql + assert @conn.table_exists?('items_view') + end + def test_tables assert_equal %w{ items }, @conn.tables |