Sha256: 9bf1ea3a2b4ee6b7615cbb3ccd20ade3c90d859d2fa3d1f20f8f9d5290f92cee
Contents?: true
Size: 873 Bytes
Versions: 7
Compression:
Stored size: 873 Bytes
Contents
# To run this script, run the following in a mysql instance: # # drop database if exists weblog_development; # create database weblog_development; # grant all on weblog_development.* to blog@localhost; # flush privileges; require 'jdbc_common' require 'db/mysql' class MysqlSimpleTest < Test::Unit::TestCase include SimpleTestMethods def test_string_quoting_oddity s = "0123456789a'a" assert_equal "'0123456789a\\'a'", ActiveRecord::Base.connection.quote(s) s2 = s[10,3] assert_equal "a'a", s2 assert_equal "'a\\'a'", ActiveRecord::Base.connection.quote(s2) end def test_table_name_quoting_with_dot s = "weblog_development.posts" assert_equal "`weblog_development`.`posts`", ActiveRecord::Base.connection.quote_table_name(s) end end class MysqlHasManyThroughTest < Test::Unit::TestCase include HasManyThroughMethods end
Version data entries
7 entries across 7 versions & 2 rubygems