diff options
author | kennyj <kennyj@gmail.com> | 2012-03-03 22:25:15 +0900 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-06-11 11:00:29 -0700 |
commit | 22994b2d638738abce7dc7672c27a5e7171018e8 (patch) | |
tree | 15032a734030d873f408032103949a156191d4cd /activerecord/test/cases/adapters/mysql2/schema_test.rb | |
parent | 0391ae9a14af1a87ca435eb7777c73271e859ae0 (diff) | |
download | rails-22994b2d638738abce7dc7672c27a5e7171018e8.tar.gz rails-22994b2d638738abce7dc7672c27a5e7171018e8.tar.bz2 rails-22994b2d638738abce7dc7672c27a5e7171018e8.zip |
Fix GH #3163. Should quote database on mysql/mysql2.
Conflicts:
activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
Diffstat (limited to 'activerecord/test/cases/adapters/mysql2/schema_test.rb')
-rw-r--r-- | activerecord/test/cases/adapters/mysql2/schema_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/schema_test.rb b/activerecord/test/cases/adapters/mysql2/schema_test.rb index d5676bc522..fd9996c937 100644 --- a/activerecord/test/cases/adapters/mysql2/schema_test.rb +++ b/activerecord/test/cases/adapters/mysql2/schema_test.rb @@ -35,6 +35,17 @@ module ActiveRecord def test_table_exists_wrong_schema assert(!@connection.table_exists?("#{@db_name}.zomg"), "table should not exist") end + + def test_tables_quoting + begin + @connection.tables(nil, "foo-bar", nil) + flunk + rescue => e + # assertion for *quoted* database properly + assert_match(/Access denied for user/, e.inspect) + end + end + end end end |