aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-06-20 18:30:35 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-06-20 18:30:35 +0000
commiteb2e30ef249051713d8122a784d8fbfa378e7ae1 (patch)
treec6b8c3ed75d1e72ac2043c54ff77c817dfd25fe3 /activerecord/test
parente963354124d27bdae0420ae0614335d251be8d51 (diff)
downloadrails-eb2e30ef249051713d8122a784d8fbfa378e7ae1.tar.gz
rails-eb2e30ef249051713d8122a784d8fbfa378e7ae1.tar.bz2
rails-eb2e30ef249051713d8122a784d8fbfa378e7ae1.zip
MySQL: fix show_variable. Closes #8448.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7071 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/adapter_test.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/activerecord/test/adapter_test.rb b/activerecord/test/adapter_test.rb
index 6d986d5dba..84af72bfa5 100644
--- a/activerecord/test/adapter_test.rb
+++ b/activerecord/test/adapter_test.rb
@@ -48,11 +48,19 @@ class AdapterTest < Test::Unit::TestCase
if current_adapter?(:MysqlAdapter)
def test_charset
- assert @connection.charset
+ assert_not_nil @connection.charset
+ assert_not_equal 'character_set_database', @connection.charset
+ assert_equal @connection.show_variable('character_set_database'), @connection.charset
end
def test_collation
- assert @connection.collation
+ assert_not_nil @connection.collation
+ assert_not_equal 'collation_database', @connection.collation
+ assert_equal @connection.show_variable('collation_database'), @connection.collation
+ end
+
+ def test_show_nonexistent_variable_returns_nil
+ assert_nil @connection.show_variable('foo_bar_baz')
end
end