aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/base_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2005-11-16 08:16:54 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2005-11-16 08:16:54 +0000
commit2076dca63fde71693e4b8e23c4b1ace0a35b964f (patch)
tree6355eab91015bf3f6d527ae5eba30709aae1db89 /activerecord/test/base_test.rb
parent1cc8ab865fb0b36df1d202ea4d08952d2881d347 (diff)
downloadrails-2076dca63fde71693e4b8e23c4b1ace0a35b964f.tar.gz
rails-2076dca63fde71693e4b8e23c4b1ace0a35b964f.tar.bz2
rails-2076dca63fde71693e4b8e23c4b1ace0a35b964f.zip
r3095@asus: jeremy | 2005-11-15 22:40:51 -0800
Ticket #1874 - Firebird adapter r3107@asus: jeremy | 2005-11-16 00:06:14 -0800 quote column aliases r3108@asus: jeremy | 2005-11-16 00:08:12 -0800 quote columns in construct_conditions_from_arguments. update sequence_name docs. introduce prefetched primary keys. r3109@asus: jeremy | 2005-11-16 00:09:08 -0800 double-quote rather than single-quote sqlite columns r3110@asus: jeremy | 2005-11-16 00:09:56 -0800 quote column names and use attribute_condition in validates_uniqueness_of r3111@asus: jeremy | 2005-11-16 00:12:24 -0800 Use QUOTED_TYPE constant in tests r3112@asus: jeremy | 2005-11-16 00:13:28 -0800 restrict test_inserts_with_pre_and_suffix to those adapters which support migrations r3113@asus: jeremy | 2005-11-16 00:14:09 -0800 Use QUOTED_TYPE constant in tests r3114@asus: jeremy | 2005-11-16 00:14:30 -0800 Use QUOTED_TYPE constant in tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/base_test.rb')
-rwxr-xr-xactiverecord/test/base_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb
index 2db2dbf837..e66c90c7fe 100755
--- a/activerecord/test/base_test.rb
+++ b/activerecord/test/base_test.rb
@@ -505,7 +505,7 @@ class BasicsTest < Test::Unit::TestCase
assert_nil topic.last_read
assert_nil topic.approved
end
-
+
def test_equality
assert_equal Topic.find(1), Topic.find(2).parent
end
@@ -1003,10 +1003,10 @@ class BasicsTest < Test::Unit::TestCase
end
def test_count_with_join
- res = Post.count_by_sql "SELECT COUNT(*) FROM posts LEFT JOIN comments ON posts.id=comments.post_id WHERE posts.type = 'Post'"
+ res = Post.count_by_sql "SELECT COUNT(*) FROM posts LEFT JOIN comments ON posts.id=comments.post_id WHERE posts.#{QUOTED_TYPE} = 'Post'"
res2 = res + 1
assert_nothing_raised do
- res2 = Post.count("posts.type = 'Post'",
+ res2 = Post.count("posts.#{QUOTED_TYPE} = 'Post'",
"LEFT JOIN comments ON posts.id=comments.post_id")
end
assert_equal res, res2