aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2007-10-31 05:58:09 +0000
committerMichael Koziarski <michael@koziarski.com>2007-10-31 05:58:09 +0000
commit8f74527282680faacb68c3d88af7c2462b95365b (patch)
tree1740769cf0fae1c5a3813082eeec927daebe0f0a /activerecord/test
parent3c9cd19786b1e74114d933594225f2fa37407be2 (diff)
downloadrails-8f74527282680faacb68c3d88af7c2462b95365b.tar.gz
rails-8f74527282680faacb68c3d88af7c2462b95365b.tar.bz2
rails-8f74527282680faacb68c3d88af7c2462b95365b.zip
Escape table names during calculation queries. [wesley.moxam, Koz] Closes #4593
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8061 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/reserved_word_test_mysql.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/reserved_word_test_mysql.rb b/activerecord/test/reserved_word_test_mysql.rb
index c740a80e81..1a7b9a1ad5 100644
--- a/activerecord/test/reserved_word_test_mysql.rb
+++ b/activerecord/test/reserved_word_test_mysql.rb
@@ -141,6 +141,11 @@ class MysqlReservedWordTest < Test::Unit::TestCase
assert_nothing_raised { Group.table_exists? }
assert_nothing_raised { Group.columns }
end
+
+ # Calculations
+ def test_calculations_work_with_reserved_words
+ assert_nothing_raised { Group.count }
+ end
#the following functions were added to DRY test cases